/nanozlib

Nanoscale secure zlib library

Primary LanguageCApache License 2.0Apache-2.0

nanozlib

Nanoscale secure zlib decoding utilizing wuffs std/zlib, and somewhat secure zlib compression using stb'z lib, written in portable C/C++(Mostly C).

nanozib provides very limited zlib decoding and encoding functionalities. nanozib is good to embed zlib support to your C/C++ application.

No C++ exception, no C assert, fuzz tested.

Requirements

  • C99, C++11 or later

Security

  • No fuzz issues found at the moment
    • Which means no seg fault for corrupted/malcious zlib data

Advantages and disadvantages

  • Advantage(s)

    • Born to be super secure.
      • No assert, No C++ exception. No segfault for corrupted/malcious zlib data.
  • Disadvantage(s)

    • Up to 2GB zlib data(No stream API yet)
    • 50 KB or more in compiled binary(even compiled with -Os)

Example

$ make
# 11 = uncompressed size
$ ./test_nanozdec test/test-000.txt.zz 11

Wuffs version

v0.3.0

TODO

  • compress using wuffs or fpng's encoder. wuffs doesn't provide zlib encoding feature at the moment.

License

Apache 2.0 for decoding part. Public domin for encoding part.

Third party licenses