Fix std/deflate degenerate H-D Huffman table

RFC 1951 section 3.2.7. "Compression with dynamic Huffman codes
(BTYPE=10)" says, "If only one distance code is used, it is encoded
using one bit, not zero bits; in this case there is a single code length
of one, with one unused code."

I had previously mis-read that excerpt to also require that the sole
distance code was the shortest distance (code 0, a distance of 1).

Fixes #66
This commit is contained in:
Nigel Tao committed 2022-01-08 13:57:34 +11:00
1 parent dda01f1a77
commit f86c80e425
7 files changed
+75 -28

No files matched your search

@@ -1 +1 @@
foo
fooABCDABC