Closed jechter closed 8 years ago
Can you add a test file demonstrating the issue?
This file should demonstrate the issue: http://files.unity3d.com/jonas/test.brotli - but not sure it is reasonable to commit a file of this size to the repo?
Added additional fixes for running out of input when reading context modes, and for prev_byte1,2 not being valid after uncompressed blocks.
Thanks!
Currently, brotli.js decompression seems to fail for me for input data with multiple meta-blocks if no output_size is specified. This is because BrotliDecompressBuffer calculates output_size from the first meta block, but that will be too small if there are multiple meta blocks. This PR changes this to resize the output buffer when another meta block is found, and the output buffer size is too small to fit it's contents.