Base64 Encoder & Decoder in 37 Lines of Python | The BASED Encoding??!
ฝัง
- เผยแพร่เมื่อ 21 ก.ย. 2024
- In this video, let's learn how base64 encoding works, and let's implement our own encoder and decoder using Python!
Original example: github.com/leon73/Python-Base64
My version: github.com/kndndrj/inloc/tree/master/base64
Absolutely wonderful videos. Please continue this series - it's really educational!
Thanks! It's really great to read comments like this.
Thank you. I very much enjoyed that.
Nice! I'm currently working on new Steganography idea that incorporates Base64.
Whoa, sounds nice. I'm thinking of playing around with stenography and making a video in the future! I'd be glad to hear how your project goes! Good luck!
Nice! Would’ve been cool to show the image base64, before decoding it
Yeah, in retrospect, I can see that!
QQ - Why is 'bits' of type string on the encode? I would have expected it to be of type bytearray.
Probably because it easily matches the string formatting he used to produce the data he put in there. In theory using strings for a growing buffer like this would be more costly because they're immutable, but it's a common case that CPython does optimize for in particular.