142 uint64_t maxUncompressedLength()
const;
154 bool needsUncompressedLength()
const;
182 std::unique_ptr<IOBuf> uncompress(
218 bool counters =
true);
227 virtual std::vector<std::string> validPrefixes()
const;
235 virtual bool canUncompress(
241 virtual uint64_t doMaxUncompressedLength()
const;
243 virtual bool doNeedsUncompressedLength()
const;
244 virtual std::unique_ptr<IOBuf> doCompress(
const folly::IOBuf* data) = 0;
245 virtual std::unique_ptr<IOBuf> doUncompress(
257 virtual uint64_t doMaxCompressedLength(
uint64_t uncompressedLength)
const = 0;
281 bool needsDataLength()
const;
386 bool uncompressStream(
396 bool counters =
true)
402 return uncompressedLength_;
408 std::unique_ptr<IOBuf> doUncompress(
413 virtual bool doNeedsDataLength()
const;
414 virtual void doResetStream() = 0;
415 virtual bool doCompressStream(
419 virtual bool doUncompressStream(
432 void assertStateIs(
State expected)
const;
437 bool progressMade_{
true};
462 int level = COMPRESSION_LEVEL_DEFAULT);
482 int level = COMPRESSION_LEVEL_DEFAULT);
523 std::vector<std::unique_ptr<Codec>> customCodecs = {},
524 std::unique_ptr<Codec> terminalCodec = {});
constexpr int COMPRESSION_LEVEL_DEFAULT
bool hasCodec(CodecType type)
folly::detail::CompressionCounter compressionMilliseconds_
StreamCodec(CodecType type, folly::Optional< int > level=folly::none, folly::StringPiece name={}, bool counters=true)
bool hasStreamCodec(CodecType type)
constexpr detail::Map< Move > move
—— Concurrent Priority Queue Implementation ——
folly::detail::CompressionCounter bytesAfterCompression_
folly::detail::CompressionCounter bytesBeforeDecompression_
folly::detail::CompressionCounter decompressions_
std::unique_ptr< StreamCodec > getStreamCodec(CodecType type, int level)
constexpr auto data(C &c) -> decltype(c.data())
folly::detail::CompressionCounter bytesBeforeCompression_
folly::detail::CompressionCounter bytesAfterDecompression_
constexpr int COMPRESSION_LEVEL_BEST
folly::detail::CompressionCounter decompressionMilliseconds_
folly::Optional< uint64_t > uncompressedLength() const
folly::detail::CompressionCounter compressions_
Wrapper around the makeCompressionCounterHandler() extension point.
std::unique_ptr< Codec > getAutoUncompressionCodec(std::vector< std::unique_ptr< Codec >> customCodecs, std::unique_ptr< Codec > terminalCodec)
constexpr int COMPRESSION_LEVEL_FASTEST
std::unique_ptr< Codec > getCodec(CodecType type, int level)