Code Mala Tang
Code Mala Tang
Mar 25, 2026 · Fundamentals

How to Build a gzip Decompressor in Rust – Inside DEFLATE, Huffman & LZ77

The article walks through creating a compact 250‑line Rust gzip decompressor from scratch, explaining gzip’s header, DEFLATE block types, bit‑reading logic, Huffman coding, and LZ77 back‑references, and shows how to test it with real compressed data, highlighting key implementation challenges and trade‑offs.

DEFLATEHuffmanLZ77
0 likes · 14 min read
How to Build a gzip Decompressor in Rust – Inside DEFLATE, Huffman & LZ77
Liangxu Linux
Liangxu Linux
Aug 31, 2020 · Fundamentals

Understanding PNG: Types, Data Structure, and Compression Mechanics

This article explains the PNG image format, covering its full name, lossless compression, size advantages, transparency support, the three main PNG types, the file’s chunk‑based data structure, hexadecimal header details, factors that affect compression efficiency, and the two‑stage prediction‑and‑deflate compression process.

DEFLATEData StructureLZ77
0 likes · 10 min read
Understanding PNG: Types, Data Structure, and Compression Mechanics