| 
    MRPT
    2.0.4
    
   | 
 
Compression using the "zip" algorithm and from/to gzip (gz) files.
mrpt_io_grp
Functions | |
| void | compress (void *inData, size_t inDataSize, std::vector< unsigned char > &outData) | 
| Compress an array of bytes into another one.  More... | |
| void | compress (const std::vector< unsigned char > &inData, std::vector< unsigned char > &outData) | 
| Compress an array of bytes into another one.  More... | |
| void | compress (void *inData, size_t inDataSize, mrpt::io::CStream &out) | 
| Compress an array of bytes and write the result into a stream.  More... | |
| void | compress (const std::vector< unsigned char > &inData, mrpt::io::CStream &out) | 
| Compress an array of bytes and write the result into a stream.  More... | |
| void | decompress (void *inData, size_t inDataSize, std::vector< unsigned char > &outData, size_t outDataEstimatedSize) | 
| Decompress an array of bytes into another one.  More... | |
| void | decompress (void *inData, size_t inDataSize, void *outData, size_t outDataBufferSize, size_t &outDataActualSize) | 
| Decompress an array of bytes into another one.  More... | |
| void | decompress (mrpt::io::CStream &inStream, size_t inDataSize, void *outData, size_t outDataBufferSize, size_t &outDataActualSize) | 
| Decompress an array of bytes into another one.  More... | |
| bool | decompress_gz_file (const std::string &file_path, std::vector< uint8_t > &buffer) | 
| Decompress a gzip file (xxxx.gz) into a memory buffer.  More... | |
| bool | compress_gz_file (const std::string &file_path, const std::vector< uint8_t > &buffer, const int compress_level=9) | 
| Compress a memory buffer into a gzip file (xxxx.gz).  More... | |
| bool | compress_gz_data_block (const std::vector< uint8_t > &in_data, std::vector< uint8_t > &out_gz_data, const int compress_level=9) | 
| Compress a memory buffer in gz-file format and return it as a block a memory.  More... | |
| bool | decompress_gz_data_block (const std::vector< uint8_t > &in_gz_data, std::vector< uint8_t > &out_data) | 
| Decompress an array of bytes storing a gz-compressed stream of data into a memory buffer.  More... | |
| void mrpt::io::zip::compress | ( | void * | inData, | 
| size_t | inDataSize, | ||
| std::vector< unsigned char > & | outData | ||
| ) | 
Compress an array of bytes into another one.
Definition at line 35 of file zip.cpp.
References ASSERT_, MRPT_END_WITH_CLEAN_UP, and MRPT_START.
Referenced by compress().
| void mrpt::io::zip::compress | ( | const std::vector< unsigned char > & | inData, | 
| std::vector< unsigned char > & | outData | ||
| ) | 
Compress an array of bytes into another one.
Definition at line 58 of file zip.cpp.
References ASSERT_, compress(), MRPT_END_WITH_CLEAN_UP, and MRPT_START.
| void mrpt::io::zip::compress | ( | void * | inData, | 
| size_t | inDataSize, | ||
| mrpt::io::CStream & | out | ||
| ) | 
Compress an array of bytes and write the result into a stream.
Definition at line 81 of file zip.cpp.
References ASSERT_, compress(), MRPT_END_WITH_CLEAN_UP, MRPT_START, and out.
| void mrpt::io::zip::compress | ( | const std::vector< unsigned char > & | inData, | 
| mrpt::io::CStream & | out | ||
| ) | 
Compress an array of bytes and write the result into a stream.
Definition at line 108 of file zip.cpp.
References ASSERT_, compress(), MRPT_END_WITH_CLEAN_UP, MRPT_START, and out.
| bool mrpt::io::zip::compress_gz_data_block | ( | const std::vector< uint8_t > & | in_data, | 
| std::vector< uint8_t > & | out_gz_data, | ||
| const int | compress_level = 9  | 
        ||
| ) | 
Compress a memory buffer in gz-file format and return it as a block a memory.
compress_level: 0=no compression, 1=best speed, 9=maximum
Definition at line 260 of file zip.cpp.
References mrpt::format(), mrpt::io::CFileInputStream::getTotalBytesCount(), mrpt::system::now(), mrpt::io::CFileInputStream::open(), mrpt::io::CFileInputStream::Read(), and THROW_EXCEPTION.
Referenced by TEST().
| bool mrpt::io::zip::compress_gz_file | ( | const std::string & | file_path, | 
| const std::vector< uint8_t > & | buffer, | ||
| const int | compress_level = 9  | 
        ||
| ) | 
Compress a memory buffer into a gzip file (xxxx.gz).
compress_level: 0=no compression, 1=best speed, 9=maximum
Definition at line 234 of file zip.cpp.
References mrpt::io::CFileGZOutputStream::fileOpenCorrectly(), mrpt::io::CFileGZOutputStream::open(), and mrpt::io::CFileGZOutputStream::Write().
| void mrpt::io::zip::decompress | ( | void * | inData, | 
| size_t | inDataSize, | ||
| std::vector< unsigned char > & | outData, | ||
| size_t | outDataEstimatedSize | ||
| ) | 
Decompress an array of bytes into another one.
| std::exception | If the apriori estimated decompressed size is not enough | 
Definition at line 135 of file zip.cpp.
References ASSERT_, MRPT_END_WITH_CLEAN_UP, and MRPT_START.
| void mrpt::io::zip::decompress | ( | void * | inData, | 
| size_t | inDataSize, | ||
| void * | outData, | ||
| size_t | outDataBufferSize, | ||
| size_t & | outDataActualSize | ||
| ) | 
Decompress an array of bytes into another one.
| std::exception | If the apriori estimated decompressed size is not enough | 
Definition at line 159 of file zip.cpp.
References ASSERT_, MRPT_END_WITH_CLEAN_UP, and MRPT_START.
| void mrpt::io::zip::decompress | ( | mrpt::io::CStream & | inStream, | 
| size_t | inDataSize, | ||
| void * | outData, | ||
| size_t | outDataBufferSize, | ||
| size_t & | outDataActualSize | ||
| ) | 
Decompress an array of bytes into another one.
| std::exception | If the apriori estimated decompressed size is not enough | 
Definition at line 182 of file zip.cpp.
References ASSERT_, MRPT_END_WITH_CLEAN_UP, MRPT_START, and mrpt::io::CStream::Read().
| bool mrpt::io::zip::decompress_gz_data_block | ( | const std::vector< uint8_t > & | in_gz_data, | 
| std::vector< uint8_t > & | out_data | ||
| ) | 
Decompress an array of bytes storing a gz-compressed stream of data into a memory buffer.
If the input data is not recognized as a .gz file, the output data will be an exact copy of the input.
Definition at line 358 of file zip.cpp.
References decompress_gz_file(), mrpt::system::getTempFileName(), and mrpt::io::vectorToBinaryFile().
Referenced by TEST().
| bool mrpt::io::zip::decompress_gz_file | ( | const std::string & | file_path, | 
| std::vector< uint8_t > & | buffer | ||
| ) | 
Decompress a gzip file (xxxx.gz) into a memory buffer.
If the file is not a .gz file, it just read the whole file unmodified.
Definition at line 209 of file zip.cpp.
References mrpt::io::CFileGZInputStream::fileOpenCorrectly(), mrpt::io::CFileGZInputStream::getTotalBytesCount(), and mrpt::io::CFileGZInputStream::Read().
Referenced by decompress_gz_data_block().
| Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |