mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Add a deflate distance-code-31 test
This commit is contained in:
1 parent
e9709992e2
commit
11a6819be9
8 files changed
+72
-2
No files matched your search
@@ -308,6 +308,16 @@ func stateDeflateFixedHuffman(line string) (stateFunc, error) {
|
||||
return stateDeflateFixedHuffman, nil
|
||||
}
|
||||
|
||||
if line == "len 3 distCode 31" {
|
||||
lCode, lExtra, lNExtra := deflateEncodeLength(3)
|
||||
g.stream.writeLCode(lCode)
|
||||
g.stream.writeBits(lExtra, lNExtra)
|
||||
dCode, dExtra, dNExtra := uint32(31), uint32(0), uint32(0)
|
||||
g.stream.writeBits(reverse(dCode, 5), 5)
|
||||
g.stream.writeBits(dExtra, dNExtra)
|
||||
return stateDeflateFixedHuffman, nil
|
||||
}
|
||||
|
||||
if l, d, ok := deflateParseLenDist(line); ok {
|
||||
lCode, lExtra, lNExtra := deflateEncodeLength(l)
|
||||
g.stream.writeLCode(lCode)
|
||||
|
||||
Reference in new issue
Block a user