"new Buffer" has been depricated since Node v6. Just use this: const newEncoded = Buffer .from(input[, initialEncoding]) .toString(newEncoding); Also, the "=" at the end is important if you need to concatenate base64 strings. The use of "=" in the binary format doesn't make sense. It has to be padded with zeros "0". Your map of "1111=" to 60 proves this as it is actuall a map of "111100" to 60. Fun fact: Base64 encoding is a secondary kind of encoding relative to ASCII, since you pad (first with zeros, then with "=" symbols) to get base64, but to go back you need to trim (first trimming "=" then trimming zeros). You can't reverse their roles in this regard since the base64 character set is a subset of the ASCII character set.
because with 6 bits you can have a total of 64 combinations: 2 to the 6th power is equal to 64. Namely if you use 6 bits you can generate 64 different combinations. You can use those combinations as indexes into a predefined table of symbols and there you have it.
I got what i wanted from minute 5 but i watch the whole thing just for the good way of explaining the subject. Thank you very much my man.
Glad it was helpful!
For the past 5 hrs I've been searching for I dont know what but your video solved my problem, you are god's angel bro 😭😂
You are a genius, I've been sucking with this about 2 days ago, and ur video brightened my mind THANKS!
I have something I need decoded that's in base 64. I'm just learning, but it's important!
simple and to the point, thank you :)
Great content .
Correct me if i'm wrong,
@3:45 , Is that a base64 table , instead of ASCII Table
Very nice, thank you!
"new Buffer" has been depricated since Node v6. Just use this:
const newEncoded = Buffer
.from(input[, initialEncoding])
.toString(newEncoding);
Also, the "=" at the end is important if you need to concatenate base64 strings.
The use of "=" in the binary format doesn't make sense. It has to be padded with zeros "0". Your map of "1111=" to 60 proves this as it is actuall a map of "111100" to 60.
Fun fact:
Base64 encoding is a secondary kind of encoding relative to ASCII, since you pad (first with zeros, then with "=" symbols) to get base64, but to go back you need to trim (first trimming "=" then trimming zeros). You can't reverse their roles in this regard since the base64 character set is a subset of the ASCII character set.
Absolutely Amazing
very well explanation. Thank you
Nice explanation!
Thank you totally got it
Sublime. Thanks
nice job
does a frontend dev convert image to base64 and the backend guy save it as string using LOB?
In some databases they do that, since it's a text string, it's easy to represent.
Can I use it for html
Thanks a lot for the explication. Can you please tell me why you have to make groups of 6 bits?
he explains early on that base64 only allows for encoding at 6-bits
because with 6 bits you can have a total of 64 combinations: 2 to the 6th power is equal to 64. Namely if you use 6 bits you can generate 64 different combinations. You can use those combinations as indexes into a predefined table of symbols and there you have it.
how to do this in angular typescript
something is not adding here - 1111 cannot be 60 in decimal 2^3 + 2^2 + 2^1 + 2^0 = 8 + 4 + 2 + 1 = 15
Okay got it! basically, the last one has been converted to 111100 (two newly added 00).
great for optimizing/taking advantage of funtions in the language, not so much for the actual learning :/
What's the name of that VSCode theme?
One Monokai
And another one that skips the binary etc
Why because you do not know it
😄