AutomaticCodec
Summary: Add codec that does automatic format detection for decompression. The codec returned by `getCodec(CodecType::AUTOMATIC)` can decompress codecs `LZ4_FRAME`, `ZSTD`, `ZLIB`, `GZIP`, and `LZMA2`. Additionally, the function `getAutomaticCodec()` allows users to pass their own custom codecs, but the 5 default codecs must also be supported. We force the default codecs on users because having a common subset of formats is in general useful, and because we want to be able to add codecs to this set. When compiled in debug mode, on construction it checks that the codecs are compatible. This helps make sure that users don't accidentally add ambiguous codecs, and if we add a new default codec in the future, tests will fail on ambiguity. Reviewed By: yfeldblum Differential Revision: D4760065 fbshipit-source-id: 9e65844aba9f1ae3d5c7b86643931782c06ab3eb
Showing
This diff is collapsed.
Please register or sign in to comment