-
Notifications
You must be signed in to change notification settings - Fork 173
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
level 0 fake compression not supported #86
Comments
Do you have a particular use case in mind for this? Just because zlib supports it doesn't necessarily mean it is useful. Also FWIW, |
In some places a zlib-wrapped stream is required even though we know the data can't be compressed effectively. This is in the context of a Minecraft Bedrock server, where the protocol unconditionally requires deflate-formatted data, although we may choose not to compress depending on the data. From my experimentation I see that libdeflate already automatically chooses to not bother compressing in some cases, so this shouldn't be too difficult to expose as a level 0. |
I guess this is more or less the same as #67 , although the way this is done in classic zlib world is letting the user provide a level 0 for compression. |
Some users may require a valid DEFLATE, zlib, or gzip stream but know ahead of time that particular inputs are not compressible. zlib supports "level 0" for this use case. Support this in libdeflate too. Resolves #86
Some users may require a valid DEFLATE, zlib, or gzip stream but know ahead of time that particular inputs are not compressible. zlib supports "level 0" for this use case. Support this in libdeflate too. Resolves #86
Some users may require a valid DEFLATE, zlib, or gzip stream but know ahead of time that particular inputs are not compressible. zlib supports "level 0" for this use case. Support this in libdeflate too. Resolves #86
Done in #88. |
Thank you! |
zlib supports a zero-compression mode under which the data is encapsulated uncompressed. libdeflate appears not to support this and segfaults when 0 is given as compression level.
The text was updated successfully, but these errors were encountered: