-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wanted: Exception when provided an insufficient buffer #19
Comments
I have renamed the issue. |
To be clear, currently, you can avoid this problem during encoding by providing sufficient buffer memory. For example, if you allocate 2x the original memory plus, say, 1024, you will never run out. During decoding, the current API assumes that you know the size of the uncompressed array. |
I don't know what is the original size before it was encoded. |
+1 for how to calculate the decompressed size if you only have compressed size. |
This issue is marked as "help wanted" and there is nobody working on it as far as I know. |
I'm wondering if the easiest way would be to put the uncompressed length at the start of the encoded buffer (just as a plain uint32_t). |
It generally works this way already. It is not a format problem, it is an API issue. |
I created a new issue #20 |
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.
The text was updated successfully, but these errors were encountered: