struct
#include <src/vt/utils/compress/compressor.h>
Compressor A streaming compressor for outputting data with brotli compression.
Constructors, destructors, conversion operators
- Compressor(int in_quality, int in_window_bits, std::size_t buf_size = 1<<20) explicit
- Construct a compressor.
- ~Compressor()
Public functions
Function documentation
vt:: util:: compress:: Compressor:: Compressor(int in_quality,
int in_window_bits,
std::size_t buf_size = 1<<20) explicit
Construct a compressor.
Parameters | |
---|---|
in_quality in | the quality of compression |
in_window_bits in | the number of bits for the lgwin |
buf_size in | the size of the temporary buffer |
template<typename StreamLike>
bool vt:: util:: compress:: Compressor:: write(StreamLike& s,
uint8_t const* buffer,
std::size_t const size)
Compress data and output to writable.
Parameters | |
---|---|
s in | the stream/writable to write compressed data |
buffer in | the buffer to compress |
size in | the length of the buffer to compress |
Returns | whether it was successful or not |
template<typename StreamLike>
bool vt:: util:: compress:: Compressor:: finish(StreamLike& s)
Finish writing data and output to writable.
Parameters | |
---|---|
s in | the stream/writable to write compressed data |
Returns | whether it was successful or not |