d8cc449d220903e3c0e777db8bb191b6cb6ee942 |
|
08-Feb-2018 |
Amin Hassani <ahassani@google.com> |
Fix contiguous huffman table read problem. In deflate format after the code lengths, there are a certain number of code lengths for literal/lengths alphabet and a certain number of codes for distance alphabets. But these two groups are huffman coded contiguously (by contiguously we mean image two arrays are appended into one array and the resulting array is huffman coded versus two arrays are individually huffman coded). But the current implementation of puffin, decodes these two groups of codes individually, which is basically wrong. This corner case has never been hit in CrOS and was discovered in AOSP. This patch, fixes this problem by coding/decoding those two Huffman code arrays together. Also fixes a small problem in unittests for = v. ==. Bug: 72815313 Test: brillo_update_payload --verify Change-Id: I1f90bb3aa36172be3020ebffb4b3ae5be0d8b1ce
/external/puffin/src/huffman_table.h
|