07-13-2014, 01:27 AM
(This post was last modified: 07-13-2014, 01:28 AM by daniel0916.)
(07-13-2014, 12:39 AM)FakeTruth Wrote: Fix this line
It's probably wrong. Check the value you get from it.Code:int UncompressedMaxSize = DataLength - (DataLength << 12) - (DataLength << 14) - (DataLength << 25) - 16;
It's the opposite of the compress code.
I use now 1000000 for testing.
Code:
char Output [1000000];
int success = uncompress((Bytef *)Output, (uLongf *)1000000, (const Bytef *)ChunkData.c_str(), (uLong)DataLength);