Skip to content
/ base64 Public

Lightning-fast singe-header base64 encoder/decoder written in C

License

Notifications You must be signed in to change notification settings

maddsua/base64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

madbase64

A Lightning-fast singe-header base64 encoder/decoder written in C

The purpose:

Encoding/decoding large sizes binary data. Yes, binary. I mean files, images and actually anything

Why?

Stackoverflow solutions are just garbage. No, really. Just look at that endless std::string pushbacks and countless temp buffers.

This one could be one of the fastest base64 enc/decoder implementation. Or it's the dumbest one. Need your feedback to tell!

Pros

  • 🚀 Achieves speeds over 100 MB/s at a single thred of AMD Ryzen 3600
  • 🚀 No I'm serious, it's fast
  • ✨ Straight-forward algorythm, no additional buffers and other nonsence
  • 👌 Tested in my other projects

Cons

  • 💣 Probably some explosive bugs (didn't find any yet)
  • 😡 Makes python and JS devs cry

Demo result:

Original:       This is a simple test string
Encoded:        VGhpcyBpcyBhIHNpbXBsZSB0ZXN0IHN0cmluZw==
Decoded:        This is a simple test string

Generated valid base64 string
Done with no errors