-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support for zstd in Deflater #2168
Comments
Is there a standard library for providing this? I'd be okay with accepting a PR to implement this. |
@ioquatix This is the one I know about: |
I think the way I see this playing out:
I don't think |
I agree, this makes a lot of sense for several reasons! Could be coupled with Rack docs pointing out a few third-party gems, or just examples of how to implement it. |
To support this and potentially other compression algorithms, I think we should provide a Deflater option for custom deflaters:
The callable would return the deflated body. The default would be something like:
Not saying the implementation would use that (should probably keep the current behavior hardcoded for performance), but that would be the behavior. |
Is there a chance that we would also want to decompress the input stream, as well as potentially compress the output stream? |
Support for
Content-Encoding
valuezstd
inRack::Deflater
.This algorithm is currently only supported by Chrome and Edge. Firefox has an open issue with little activity and Safari has "positive" as their standard position, but I could see no implementation work.
Perhaps it's too early to spend time on this, but wanted to raise the issue nonetheless.
Useful for things such as JSON payloads and other dynamic content that cannot be compressed ahead of time. The compression ratio is similar to gzip, but it's twice as fast to decompress and (I think) slightly quicker to compress too.
Resources
The text was updated successfully, but these errors were encountered: