16 #ifndef IMPALA_UTIL_COMPRESS_H
17 #define IMPALA_UTIL_COMPRESS_H
42 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
44 const uint8_t* input, int64_t* output_length, uint8_t** output);
67 int64_t* output_length, uint8_t* output);
73 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
75 const uint8_t* input, int64_t* output_length, uint8_t** output);
87 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
89 const uint8_t* input, int64_t* output_length, uint8_t** output);
101 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
103 const uint8_t* input, int64_t* output_length, uint8_t** output);
109 static uint32_t
ComputeChecksum(int64_t input_len,
const uint8_t* input);
124 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
126 const uint8_t* input, int64_t* output_length, uint8_t** output);
virtual ~SnappyCompressor()
virtual ~SnappyBlockCompressor()
virtual Status Init()
Initialize the codec. This should only be called once.
virtual Status Init()
Initialize the codec. This should only be called once.
virtual ~GzipCompressor()
virtual Status Init()
Initialize the codec. This should only be called once.
virtual int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
virtual Status ProcessBlock(bool output_preallocated, int64_t input_length, const uint8_t *input, int64_t *output_length, uint8_t **output)
Process a block of data, either compressing or decompressing it.
virtual Status Init()
Initialize the codec. This should only be called once.
virtual int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
static const int GZIP_CODEC
SnappyCompressor(MemPool *mem_pool=NULL, bool reuse_buffer=false)
virtual int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
virtual Status Init()
Initialize the codec. This should only be called once.
virtual std::string file_extension() const
File extension to use for this compression codec.
BzipCompressor(MemPool *mem_pool, bool reuse_buffer)
z_stream stream_
Structure used to communicate with the library.
virtual int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
virtual std::string file_extension() const
File extension to use for this compression codec.
virtual Status ProcessBlock(bool output_preallocated, int64_t input_length, const uint8_t *input, int64_t *output_length, uint8_t **output)
Process a block of data, either compressing or decompressing it.
virtual std::string file_extension() const
File extension to use for this compression codec.
virtual std::string file_extension() const
File extension to use for this compression codec.
virtual Status ProcessBlock(bool output_preallocated, int64_t input_length, const uint8_t *input, int64_t *output_length, uint8_t **output)
Process a block of data, either compressing or decompressing it.
virtual Status ProcessBlock(bool output_preallocated, int64_t input_length, const uint8_t *input, int64_t *output_length, uint8_t **output)
Process a block of data, either compressing or decompressing it.
GzipCompressor(Format format, MemPool *mem_pool=NULL, bool reuse_buffer=false)
virtual Status ProcessBlock(bool output_preallocated, int64_t input_length, const uint8_t *input, int64_t *output_length, uint8_t **output)
Process a block of data, either compressing or decompressing it.
Status Compress(int64_t input_length, const uint8_t *input, int64_t *output_length, uint8_t *output)
static const int WINDOW_BITS
These are magic numbers from zlib.h. Not clear why they are not defined there.
virtual int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
Format
Compression formats supported by the zlib library.
virtual ~BzipCompressor()
SnappyBlockCompressor(MemPool *mem_pool, bool reuse_buffer)
virtual std::string file_extension() const
File extension to use for this compression codec.
Lz4Compressor(MemPool *mem_pool=NULL, bool reuse_buffer=false)
static uint32_t ComputeChecksum(int64_t input_len, const uint8_t *input)