Home | History | Annotate | Download | only in examples

Lines Matching full:compressed_data

45   char *compressed_data = malloc(max_dst_size);
46 if (compressed_data == NULL)
47 run_screaming("Failed to allocate memory for *compressed_data.", 1);
48 // That's all the information and preparation LZ4 needs to compress *src into *compressed_data. Invoke LZ4_compress_default now
51 return_value = LZ4_compress_default(src, compressed_data, src_size, max_dst_size);
62 compressed_data = (char *)realloc(compressed_data, compressed_data_size);
63 if (compressed_data == NULL)
64 run_screaming("Failed to re-alloc memory for compressed_data. Sad :(", 1);
67 // Now that we've successfully compressed the information from *src to *compressed_data, let's do the opposite! We'll create a
74 return_value = LZ4_decompress_safe(compressed_data, new_src, compressed_data_size, src_size);
81 // Not only does a positive return value mean success, the value returned == the number of bytes read from the compressed_data