|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Bounded RFC 1951 DEFLATE compressor - implementation. More...
#include "deflate.h"Go to the source code of this file.
Bounded RFC 1951 DEFLATE compressor - implementation.
Fixed-Huffman (BTYPE=01) encoding with greedy LZ77 matching over a bounded window. Hash chains (head[]/prev[]) locate candidate matches; the chain depth and the window are both capped so the per-byte cost is bounded - deterministic rather than maximal compression, which suits the small messages this serves. The static code tables are generated from the RFC 1951 sec 3.2.6 code lengths (the same lengths inflate's fixed() builds) so the two stay in lock-step.
Bits are packed LSB-first into the byte stream; Huffman codes are stored bit-reversed so writing them LSB-first puts them on the wire MSB-first as RFC 1951 sec 3.1.1 requires. All state is the caller's scratch plus the stack.
Definition in file deflate.cpp.