1038 constexpr
uint64_t uncompressedLength = 1000;
1040 auto compressed =
codec_->compress(original.get());
1042 if (!
codec_->needsUncompressedLength()) {
1043 auto uncompressed =
auto_->uncompress(compressed.get());
1044 EXPECT_EQ(uncompressedLength, uncompressed->computeChainDataLength());
1048 auto uncompressed =
auto_->uncompress(compressed.get(), uncompressedLength);
1049 EXPECT_EQ(uncompressedLength, uncompressed->computeChainDataLength());
1052 ASSERT_GE(compressed->computeChainDataLength(), 8);
1053 for (
size_t i = 0;
i < 8; ++
i) {
1054 auto split = compressed->clone();
1055 auto rest = compressed->clone();
1059 auto uncompressed =
auto_->uncompress(
split.get(), uncompressedLength);
1060 EXPECT_EQ(uncompressedLength, uncompressed->computeChainDataLength());
#define ASSERT_GE(val1, val2)
static std::unique_ptr< IOBuf > wrapBuffer(const void *buf, std::size_t capacity)
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
void split(const Delim &delimiter, const String &input, std::vector< OutputType > &out, bool ignoreEmpty)
uint64_t hashIOBuf(const IOBuf *buf)
std::unique_ptr< Codec > auto_
std::unique_ptr< Codec > codec_