9 #ifndef ZipCompression_H
10 #define ZipCompression_H
33 std::vector<unsigned char> &outData);
38 const std::vector<unsigned char> &inData,
39 std::vector<unsigned char> &outData);
51 const std::vector<unsigned char> &inData,
60 std::vector<unsigned char> &outData,
61 size_t outDataEstimatedSize);
70 size_t outDataBufferSize,
71 size_t &outDataActualSize);
80 size_t outDataBufferSize,
81 size_t &outDataActualSize);
89 const std::string &file_path,
98 const std::string &file_path,
100 const int compress_level = 9
112 const int compress_level = 9);
void BASE_IMPEXP compress(const std::vector< unsigned char > &inData, CStream &out)
Compress an array of bytes and write the result into a stream.
class BASE_IMPEXP CStream
void BASE_IMPEXP decompress(void *inData, size_t inDataSize, std::vector< unsigned char > &outData, size_t outDataEstimatedSize)
Decompress an array of bytes into another one If the apriori estimated decompressed size is not enoug...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
std::vector< uint8_t > vector_byte
void BASE_IMPEXP compress(void *inData, size_t inDataSize, std::vector< unsigned char > &outData)
Compress an array of bytes into another one.
bool BASE_IMPEXP compress_gz_file(const std::string &file_path, const vector_byte &buffer, const int compress_level=9)
Compress a memory buffer into a gzip file (xxxx.gz).
bool BASE_IMPEXP decompress_gz_file(const std::string &file_path, vector_byte &buffer)
Decompress a gzip file (xxxx.gz) into a memory buffer.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool BASE_IMPEXP compress_gz_data_block(const vector_byte &in_data, vector_byte &out_gz_data, const int compress_level=9)
Compress a memory buffer in gz-file format and return it as a block a memory.
bool BASE_IMPEXP decompress_gz_data_block(const vector_byte &in_gz_data, vector_byte &out_data)
Decompress an array of bytes storing a gz-compressed stream of data into a memory buffer...