commit | f4d6ce936c8dc39e8ee1d8f2bd44c64ce2188a24 | [log] [tgz] |
---|---|---|
author | Amin Hassani <ahassani@google.com> | Thu Apr 12 14:54:35 2018 -0700 |
committer | Amin Hassani <ahassani@google.com> | Fri Apr 13 12:53:13 2018 -0700 |
tree | eca69ecc22016e6d4369ed490158036cd25ffda5 | |
parent | 2f8c6327151f4aa82ca5ddf7f870f844a564f668 [diff] |
Fix unittest failure introduced in aosp/663042 Fixing unittests was missed in aosp/663042 where the target Huff streams would have zero length. We now need the streams to have definite length before we can move forward. This patch adds a new flag ignore_deflate_size to CreateForHuff() so the size of the source deflate stream is ignored when doing unittests or using puffin binary. Also added unittest. Bug: none Test: unittest Test: corpus Change-Id: I2ee13bdfa51154f5948b695ddca835a5970f0df1
Source code for Puffin: A utility for deterministic DEFLATE recompression.
TODO(ahassani): Describe the directory structure and how-tos.
Alphabet A value that occurs in the input stream. It can be either a literal:[0..255], and end of block sign [256], a length[257..285], or a distance [0..29].
Huffman code A variable length code representing the Huffman encoded of an alphabet. Huffman codes can be created uniquely using Huffman code length array.
Huffman code array An array which an array index identifies a Huffman code and the array element in that index represents the corresponding alphabet. Throughout the code, Huffman code arrays are identified by vectors with postfix hcodes_
.
Huffman reverse code array An array which an array index identifies an alphabet and the array element in that index contains the Huffman code of the alphabet. Throughout the code, The Huffman reverse code arrays are identified by vectors with postfix rcodes_
.
Huffman code length The number of bits in a Huffman code.
Huffman code length array An array of Huffman code lengths with the array index as the alphabet. Throughout the code, Huffman code length arrays are identified by vectors with postfix lens_
.