12 #include <gtest/gtest.h> 20 TEST(Compress, DataBlockGZ)
22 const size_t N = 20000;
26 for (
size_t i=0;i<N;i++)
27 in_data[i] = static_cast<uint8_t>(i);
35 GTEST_FAIL() <<
"Error in compress_gz_data_block\n";
41 GTEST_FAIL() <<
"Error in decompress_gz_data_block\n";
47 EXPECT_EQ(0, err ) <<
"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 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...
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 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.