Update Decompression.md - drop deflate, mention zstd #405
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, we can't use
:zlib.unzip/1
for deflate. If anything, it's:zlib.uncompress/1
:But I don't think it's quite that simple.
Bandit has support for deflate: https://github.com/mtrudel/bandit/blob/1.0.0-pre.11/lib/bandit/compression.ex#L15 but using
:zlib.uncompress/1
there crashes:I trust @mtrudel to have followed the RFCs and implemented this correctly. :) So if you want to mention
deflate
, we should follow his implementation, do the opposite.But, and maybe I'm just burned out with this a bit, I don't think it's worth it. None of the big sites seem to support it. And then there's https://zlib.net/zlib_faq.html#faq39
And then there's this excerpt from
zlib:deflateInit/6
Again I think the implementation is correct because I saw setting
-MAX_BITS
in Python or Ruby too.I had (wrong) support for it in Req and decided to just drop it (wojtekmach/req@e19d89f, wojtekmach/req#215) fwiw.