I'm using LZ4 library and when decompressing data with
int LZ4_decompress_safe (const char* source, char* dest, int compressedSize, int maxDecompressedSize);
I want to estimate maximum decompressed data size. But I can not find reverse function of
int LZ4_compressBound(int isize);
with which I can determine the upper bound for decompressed data, which to provide to last parameter maxDecompressedSize
, of decompressing function.
Other compression libraries like snappy for example, provides such function.
bool GetUncompressedLength(Source* source, uint32* result);
What can I do if I have not capability to save initial data size (before compression), and if I don't want to be over pessimistic for the size of the buffer which I must allocate?