Zlib vs Deflate vs Gzip — pick the right decoder
All three formats use the DEFLATE algorithm but differ in the wrapper. Zlib (RFC 1950) starts with a 2-byte header (typically 0x78 0x9C) and ends with an Adler-32 checksum — the format used by PNG, Git, JAR, and most language standard libraries. Gzip (RFC 1952) starts with 0x1F 0x8B and ends with CRC-32. Raw deflate (RFC 1951) has no header. If your input is not zlib, switch to the matching tool.
This decoder uses the browser's built-in DecompressionStream('deflate') — interoperable with Python zlib.decompress, Node zlib.inflateSync, Java Inflater, and any RFC 1950 implementation.