fix ZSTD support
authorPhilip Pronin <philipp@fb.com>
Tue, 20 Sep 2016 03:52:08 +0000 (20:52 -0700)
committerFacebook Github Bot 4 <facebook-github-bot-4-bot@fb.com>
Tue, 20 Sep 2016 03:53:41 +0000 (20:53 -0700)
commit151e22b290a371ee1dfcf605b5bfa0e58fe2d9ae
tree18d8fc7c5b5200118ca95fca823ba965d776dd52
parent8d329050cc18c02716dda2d1dea45bbef8fc4c53
fix ZSTD support

Summary:
Existing logic is broken (unable to correctly handle chained `IOBuf`
in case of both `compress` and `uncompress`) and has unnecessarly strict
`needsUncompressedLength() == true` requirement.

This diff switches `ZSTDCodec` to use streaming to handle chained `IOBuf`,
drops `needsUncompressedLength() == true`.

Reviewed By: luciang

Differential Revision: D3827579

fbshipit-source-id: 0ef6a9ea664ef585d0e181bff6ca17166b28efc2
folly/io/Compression.cpp
folly/io/test/CompressionTest.cpp