Zlib – a spiffy yet delicately unobtrusive compression library

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • SaaSHub - Software Alternatives and Reviews
  • ZLib

    A massively spiffy yet delicately unobtrusive compression library.

    I feel obliged to point this out here:

    Do not build zlib with the optimized assembly code.

    The "hand-optimized" assembly code is a contribution and does not receive support by the library authors. There are bugs in there and it will read/write out of bounds given just the right data - we've been bit by it. Note [0].

    The Makefiles get this right - they stay far away from any hand-rolled assembly. But the contributed Visual Studio solutions default to building with the ASM: [1] [2]. *Make sure to choose Debug/ReleaseWithoutAsm.

    You can check any zlib build for whether it was built with ASM via (zlibCompileFlags() & (1 << 9)): [3]

    Needless to say, an OOB in a library as fundamental (and as user-data-facing) as zlib is a serious vulnerability. We didn't find any distribution or major software that uses a vulnerable zlib build, but if you are on Windows you might accidentally make one. Beware!

    [0]: https://github.com/madler/zlib/blob/master/inffast.c#L12

    [1]: https://github.com/madler/zlib/blob/cacf7f1d4e3d44d871b605da...

    [2]: https://github.com/madler/zlib/blob/cacf7f1d4e3d44d871b605da...

    [3]: https://github.com/madler/zlib/blob/cacf7f1d4e3d44d871b605da...

  • zlib

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • zlib

    Cloudflare fork of zlib with massive performance improvements (by cloudflare)

  • zlib-ng

    zlib replacement with optimizations for "next generation" systems.

  • libdeflate

    Heavily optimized library for DEFLATE/zlib/gzip compression and decompression

    Going away from Zlib proper but staying with its format, there’s libdeflate[1], an implementation that’s substantially faster on modern machines but can’t stream, and of course Zopfli[2], a glacially slow compressor that’s somewhat better (and occasionally much more so).

    [1] https://github.com/ebiggers/libdeflate

    [2] https://github.com/google/zopfli

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts