-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
StreamPeerGzip::finish() fails when compressing with Condition "err != (p_close ? 1 : 0)" is true. Returning: FAILED #97201
Comments
Can confirm, but unsure exactly what the approach here should be and where the limitation lies, if this is an error in implementing things, or if this is a limitation that needs to be documented As long as this isn't a bug in our implementation the error message should be improved, and this issue should then be tracked in (not adding yet as it isn't clear what exactly is wrong here): |
I noticed that the finish() method calls _process with a hard coded I'm not sure if I'm missing something, but shouldn't this pass in buffer.size() instead? |
I was able to test this locally, and passing in buffer.size() to the _process method instead of 1024 did fix the issue for me:
|
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Fixes godotengine#97201 Instead of using and arbitrary fixed size for the internal buffer, the remaining available bytes of the internal `RingBuffer` is used. Also add unit tests for `StreamPeerGZIP`
Tested versions
Reproduced in the following versions
System information
Windows 11 Pro. i5-12600k
Issue description
When attempting to compress some "large" data (around ~6kb json string), calling finish() fails with the following error and only the 10 byte gzip header is returned.
Link to Source
My Code
Output When Error Occurs
Steps to reproduce
In my tests, this happens when the compressed output data is larger than 1034 bytes. In my case, this happened when trying to compress anything larger than ~6kb of json string data (with no whitespace)
Simply call the Gzip() func above, passing in data that will compress to anything larger than 1034 bytes
lorem_bad.txt
lorem_bad.txt.gz
lorem_ok.txt
lorem_ok.txt.gz
Minimal reproduction project (MRP)
gzip_mrp.zip
The text was updated successfully, but these errors were encountered: