I am currently trying to compress/decompress a list of 64-bit integers using LZ4 algorithm.
In the repository, it says that LZ4_decompress_safe_partial() can be used to decompress an LZ4 compressed block of desired output bytes, starting at desired position.
Specifically, what I want to do is to only decompress particular portions of the compressed data, and retrieve only those portions of the given source.
For instance, in the example of simple_buffer.c, const char* const src is given as "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor site amat.".
After compressing it into char* compressed_data, I only want to retrieve, say, consectetur adipiscing elit as the output of the decompression, by only partially decompressing compressed_data.
It says that the first argument of LZ4_decompress_safe_partial() indicates where to start the decompression. How do I determine the starting position of the compressed_data which relates to c of consectetur? Is there any meta-data or other way to figure this out?
Thanks in advance.