#include <ZlibStreamCompressor.h>
Definition at line 25 of file ZlibStreamCompressor.h.
proxygen::ZlibStreamCompressor::~ZlibStreamCompressor |
( |
| ) |
|
std::unique_ptr< IOBuf > proxygen::ZlibStreamCompressor::compress |
( |
const folly::IOBuf * |
in, |
|
|
bool |
trailer = true |
|
) |
| |
Definition at line 109 of file ZlibStreamCompressor.cpp.
References folly::io::addOutputBuffer(), folly::FATAL, folly::IOBuf::prev(), folly::gen::range(), status_, folly::IOBuf::trimEnd(), uint32_t, uint64_t, uint8_t, and zlibStream_.
Referenced by compressThenDecompress().
111 auto bufferLength = FLAGS_zlib_compressor_buffer_growth;
115 for (
auto&
range : *in) {
128 DLOG(FATAL) <<
"Deflate failed: " <<
zlibStream_.msg;
141 DLOG(FATAL) <<
"Deflate failed: " <<
zlibStream_.msg;
150 DLOG(FATAL) <<
"Deflate failed: " <<
zlibStream_.msg;
static std::unique_ptr< IOBuf > addOutputBuffer(MutableByteRange &output, uint64_t size)
Gen range(Value begin, Value end)
bool proxygen::ZlibStreamCompressor::finished |
( |
| ) |
|
|
inline |
int proxygen::ZlibStreamCompressor::getStatus |
( |
| ) |
|
|
inline |
bool proxygen::ZlibStreamCompressor::hasError |
( |
| ) |
|
|
inline |
int proxygen::ZlibStreamCompressor::level_ {Z_DEFAULT_COMPRESSION} |
|
private |
int proxygen::ZlibStreamCompressor::status_ {-1} |
|
private |
z_stream proxygen::ZlibStreamCompressor::zlibStream_ |
|
private |
The documentation for this class was generated from the following files: