azyx3 / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

LZ4_uncompress returns bytes read from input rather than bytes uncompressed #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. LZ4_uncompress returns the number of input bytes processed

What is the expected output? What do you see instead?
I would expect it to return the number of bytes decompressed. I already know 
the size of my input and that is what always shows in the return value.

What version of the product are you using? On what operating system?
Using on iOS 6, iPad 3

Please provide any additional information below.
I've modified the return value to be this:

return 5 + (int)((char*)op - dest); // return the num bytes output

For my purposes this returns the number of bytes uncompressed, although I have 
to add 5 because the op pointer doesn't seem to be at the real end when the 
algorithm finishes.

Original issue reported on code.google.com by JJX...@gmail.com on 27 Sep 2012 at 4:03

GoogleCodeExporter commented 9 years ago
Never mind, close this. I just found the LZ4_uncompress_unknownOutputSize method

Original comment by JJX...@gmail.com on 27 Sep 2012 at 4:14

GoogleCodeExporter commented 9 years ago
Yes, correct ;)

Original comment by yann.col...@gmail.com on 27 Sep 2012 at 3:44