12 #include <gtest/gtest.h> 19 TEST(Compress, DataBlockGZ)
21 const size_t N = 20000;
25 for (
size_t i = 0; i < N; i++)
26 in_data[i] = static_cast<uint8_t>(
35 GTEST_FAIL() <<
"Error in compress_gz_data_block\n";
43 GTEST_FAIL() <<
"Error in decompress_gz_data_block\n";
51 <<
"Differences after compressing & decompressing with GZ\n";
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
compress_data(j_compress_ptr cinfo, JSAMPIMAGE input_buf)
std::vector< uint8_t > vector_byte
bool 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...
This base provides a set of functions for maths stuff.
CONTAINER::Scalar sum(const CONTAINER &v)
Computes the sum of all the elements.
TEST(Compress, DataBlockGZ)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool 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.