35 #include <gtest/gtest.h> 42 for (
size_t i = 0; i <
sizeof(
input); ++i) {
45 for (
size_t i = 0; i <
sizeof(
output); ++i) {
48 for (
size_t i = 0; i <
sizeof(
other); ++i) {
71 for (counter = 0; ret ==
ROSLZ4_OK; ++counter) {
93 for (
size_t i = 0; i <
sizeof(
other); ++i) {
94 ASSERT_EQ(
input[i],
other[i]) <<
"Original and uncompressed data differ at index " << i;
100 unsigned int comp_size =
sizeof(
output);
106 unsigned int decomp_size =
sizeof(
other);
109 ASSERT_EQ(
sizeof(
input), decomp_size);
111 for (
size_t i = 0; i <
sizeof(
other); ++i) {
112 ASSERT_EQ(
input[i],
other[i]) <<
"Original and uncompressed data differ at index " << i;
117 unsigned int comp_size =
sizeof(
output);
124 unsigned int decomp_size =
sizeof(
other);
130 int main(
int argc,
char **argv) {
131 testing::InitGoogleTest(&argc, argv);
132 return RUN_ALL_TESTS();
void roslz4_compressEnd(roslz4_stream *stream)
TEST_F(CompressATest, Stream)
int roslz4_compress(roslz4_stream *stream, int action)
int roslz4_decompressStart(roslz4_stream *stream)
int roslz4_buffToBuffDecompress(char *input, unsigned int input_size, char *output, unsigned int *output_size)
const int ROSLZ4_STREAM_END
void roslz4_decompressEnd(roslz4_stream *str)
const int ROSLZ4_DATA_ERROR
int roslz4_buffToBuffCompress(char *input, unsigned int input_size, char *output, unsigned int *output_size, int block_size_id)
int roslz4_compressStart(roslz4_stream *stream, int block_size_id)
int roslz4_decompress(roslz4_stream *stream)
int main(int argc, char **argv)