Definition at line 310 of file CompressionTest.cpp.
void folly::io::test::CompressionVarintTest::runSimpleTest |
( |
const DataHolder & |
dh | ) |
|
|
protected |
Definition at line 332 of file CompressionTest.cpp.
References codec_, folly::IOBuf::copyBuffer(), folly::io::test::DataHolder::data(), EXPECT_EQ, folly::io::test::DataHolder::hash(), folly::io::test::hashIOBuf(), max, min, folly::gen::move, folly::io::test::oneBasedMsbPos(), folly::Random::rand64(), uint64_t, and folly::IOBuf::wrapBuffer().
334 auto compressed =
codec_->compress(original.get());
340 compressed->data(),
std::min(compressed->length(), breakPoint));
341 compressed->trimStart(breakPoint);
342 tinyBuf->prependChain(
std::move(compressed));
345 auto uncompressed =
codec_->uncompress(compressed.get());
static std::unique_ptr< IOBuf > wrapBuffer(const void *buf, std::size_t capacity)
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
uint64_t hashIOBuf(const IOBuf *buf)
uint64_t uncompressedLength_
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
uint64_t oneBasedMsbPos(uint64_t number)
std::unique_ptr< Codec > codec_
void folly::io::test::CompressionVarintTest::SetUp |
( |
| ) |
|
|
inlineoverrideprotected |
std::unique_ptr<Codec> folly::io::test::CompressionVarintTest::codec_ |
|
protected |
uint64_t folly::io::test::CompressionVarintTest::uncompressedLength_ |
|
protected |
The documentation for this class was generated from the following file: