Chinna
Chinna

Reputation: 3992

Is it possible to encode different blocks using different huffman codes(fixed and dynamic) in deflate algorithm?

Is it possible to encode different data blocks in a file using different huffman codes (some blocks using fixed and some using dynamic)? If so, how can deflate decompress detects these different blocks?

Upvotes: 0

Views: 47

Answers (1)

Mark Adler
Mark Adler

Reputation: 112239

Yes.

Each deflate block starts with a three-bit header indicating whether this is the last block or not (one bit), and which of three possible block types it is (two bits).

Upvotes: 0

Related Questions