Allow decompresion without uncompressedSize
authorNick Terrell <terrelln@fb.com>
Fri, 24 Mar 2017 21:30:45 +0000 (14:30 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 24 Mar 2017 21:37:06 +0000 (14:37 -0700)
commit6fac16c64da068d31789b2dec3f00ec17d6ba9d6
tree826643165a59f0f74af82b6fc34304a2c3cb2297
parent0659842527913025d998860811fe135cc6170044
Allow decompresion without uncompressedSize

Summary:
The `LZMA2` codec doesn't allow decompression without passing the uncompressed size.
Every other codec that supports streaming decompression without the uncompressed size by streaming into an IOBuf chain.
Benchmarks show that reducing the `defaultBufferLength` to 256 KiB doesn't slow down decompression of large files, but it speeds up decompression of small files (< 1000 bytes).

Reviewed By: yfeldblum

Differential Revision: D4751571

fbshipit-source-id: 39dbe6754a1ecdc2b7ba3107e9face926d4c98ca
folly/io/Compression.cpp
folly/io/test/CompressionTest.cpp