16 #ifndef IMPALA_UTIL_DECOMPRESS_H
17 #define IMPALA_UTIL_DECOMPRESS_H
31 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
33 const uint8_t* input, int64_t* output_length, uint8_t** output);
35 int64_t* input_bytes_read, int64_t* output_length, uint8_t** output,
bool* eos);
41 MemPool* mem_pool = NULL,
bool reuse_buffer =
false,
bool is_deflate =
false);
58 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
60 int64_t input_length,
const uint8_t* input,
61 int64_t* output_length, uint8_t** output);
77 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
79 const uint8_t* input, int64_t* output_length, uint8_t** output);
94 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
96 const uint8_t* input, int64_t* output_length, uint8_t** output);
108 virtual int64_t
MaxOutputLen(int64_t input_len,
const uint8_t* input = NULL);
110 const uint8_t* input, int64_t* output_length, uint8_t** output);
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 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.
SnappyBlockDecompressor(MemPool *mem_pool, bool reuse_buffer)
BzipDecompressor(MemPool *mem_pool, bool reuse_buffer)
virtual ~GzipDecompressor()
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 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 int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
virtual ~SnappyBlockDecompressor()
virtual Status Init()
Initialize the codec. This should only be called once.
Lz4Decompressor(MemPool *mem_pool=NULL, bool reuse_buffer=false)
static const int WINDOW_BITS
These are magic numbers from zlib.h. Not clear why they are not defined there.
std::string DebugStreamState() const
static const int DETECT_CODEC
virtual ~BzipDecompressor()
virtual Status ProcessBlockStreaming(int64_t input_length, const uint8_t *input, int64_t *input_bytes_read, int64_t *output_length, uint8_t **output, bool *eos)
virtual ~SnappyDecompressor()
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.
virtual Status Init()
Initialize the codec. This should only be called once.
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 ~Lz4Decompressor()
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.
bool is_deflate_
If set assume deflate format, otherwise zlib or gzip.
virtual int64_t MaxOutputLen(int64_t input_len, const uint8_t *input=NULL)
GzipDecompressor(MemPool *mem_pool=NULL, bool reuse_buffer=false, bool is_deflate=false)
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.
static const uint TRAILING_CHECKSUM_LEN
SnappyDecompressor(MemPool *mem_pool=NULL, bool reuse_buffer=false)
virtual Status Init()
Initialize the codec. This should only be called once.