Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages