brotli/c
Alexey Ivanov c94c6f805c tools/brotli: improve window size autodetect (#710)
Window size is defined as:
    `(1 << BROTLI_PARAM_LGWIN) - 16`
in `c/include/brotli/encode.h`

Therefore we should probably take these 16 bytes into account.

Done basic manual testing:
$ python3 -c 'print ("A"*2046)' > t
$ bazel run -- //:brotli -w 0 -f -o $(realpath t).br $(realpath ./t)
$ python3 research/brotlidump.py t.br |& fgrep WSIZE
0000  c1                1000001 WSIZE   windowsize=(1<<12)-16=4080

New version properly detects window size of `4080`, while previous one used `2032`:
$ python3 research/brotlidump.py t.br |& fgrep WSIZE
0000  b1                0110001 WSIZE   windowsize=(1<<11)-16=2032
2018-10-02 16:28:37 +02:00
..
common decode: faster huffman code loading on 32-bit Arm (#703) 2018-09-27 13:15:46 +02:00
dec decode: faster huffman code loading on 32-bit Arm (#703) 2018-09-27 13:15:46 +02:00
enc Update (#706) 2018-09-13 08:09:32 -04:00
fuzz Convert fuzzer to C99. (#686) 2018-06-18 14:39:38 +02:00
include/brotli Update (#688) 2018-06-20 15:14:10 +02:00
tools tools/brotli: improve window size autodetect (#710) 2018-10-02 16:28:37 +02:00