-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Content-Encoding: deflate is actually zlib #46
Comments
@sschepens , could you confirm that fasthttp now properly handles |
As for @klauspost 's compress library, I'll look into it later. |
AFAIR there are different opinions on what Found a some information from Mark Adler:
CRC will actually be faster on AMD64, since there are assembler optimized routines (if you use my compression package), so the last point isn't valid for Go. |
@klauspost I know gzip is usually preferred over deflate, but I use some services that only support deflate. I believe nowadays it's more common to have deflate as zlib than raw deflate, and according to standard should be zlib. |
@klauspost , are there chances for the integration of your compression performance improvements into standard Go library? |
@valyala - yes, I have just begun submitting the CLs, but it will of course not be out until 1.7. Meanwhile, it can easily be integrated. There should be nothing more than an import change to use the current code, which is roughly 1.7x faster than the built-in, with no allocations if the Encoder is reused - which you appear to already do. |
…rd compress/*, since it provides better performance on average
Substituted standard compress library with https://github.com/klauspost/compress |
👍 |
Had this issue with another library.
It's a little counter-intuitive, but Content-Encoding: deflate is actually not a simple flate stream, but a zlib one.
According to [Wikipedia](https://en.wikipedia.org/wiki/HTTP_compression:
fasthttp currently uses
flate
package for handling deflated content, but should usezlib
Also, it would be great if fasthttp used: https://github.com/klauspost/compress as it provides optimized compression packages
The text was updated successfully, but these errors were encountered: