1 # class http\Encoding\Stream\Deflate extends http\Encoding\Stream
3 A deflate stream supporting deflate, zlib and gzip encodings.
10 Zlib encoding. RFC1950
12 Deflate encoding. RFC1951
14 Default compression level.
16 Least compression level.
18 Greatest compression level.
20 Default compression strategy.
22 Filtered compression strategy.
24 Huffman strategy only.
26 Run-length encoding strategy.
28 Encoding with fixed Huffman codes only.
30 > **A note on the compression strategy:**
32 > The strategy parameter is used to tune the compression algorithm.
34 > Use the value DEFAULT_STRATEGY for normal data, FILTERED for data produced by a filter (or predictor), HUFFMAN_ONLY to force Huffman encoding only (no string match), or RLE to limit match distances to one (run-length encoding).
36 > Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY.
38 > RLE is designed to be almost as fast as HUFFMAN_ONLY, but give better compression for PNG image data.
40 > FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
42 > The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately.
44 >_Source: [zlib Manual](http://www.zlib.net/manual.html)_