When trying to decode data using uncompress function I receive an Unhandled exception (Access violation). The size sending to function is too small, and I expected to get NotEnoughStorage exception so the buffer will resize to the right uncompressed size.