Overview of nanozlib
mainnanozlib is a lightweight C/C++ library designed for embedding zlib support into applications. It provides nanoscale secure zlib decoding (using Wuffs std/zlib) and somewhat secure zlib compression (using stb_zlib).
Key Characteristics
- Security: The decoding part is designed to be highly secure, specifically avoiding
assert, C++ exceptions, and segmentation faults when encountering corrupted or malicious zlib data. - Limitations:
- Supports up to 2GB.
- Adds approximately 50 KB or more to the compiled binary size (even with
-Osoptimization).
- Alternatives: If you require a 'picoscale' (extremely small) zlib decoder, consider the zlib module in
stb_imageinstead.