pub enum BlockType {
Uncompressed,
Fixed,
Dynamic,
}
Expand description
The type of data blocks to generate for a DEFLATE stream.
Variants§
Uncompressed
Non-compressed blocks (BTYPE=00).
The input data will be divided into chunks up to 64 KiB big and stored in the DEFLATE stream without compression. This is mainly useful for test and development purposes.
Fixed
Compressed blocks with fixed Huffman codes (BTYPE=01).
The input data will be compressed into DEFLATE blocks using a fixed Huffman tree defined in the DEFLATE specification. This provides fast but poor compression, as the Zopfli algorithm is not actually used.
Dynamic
Select the most space-efficient block types for the input data. This is the recommended type for the vast majority of Zopfli applications.
This mode lets the Zopfli algorithm choose the combination of block
types that minimizes data size. The emitted block types may be
Uncompressed
or Fixed
, in
addition to compressed with dynamic Huffman codes (BTYPE=10).