Comments (8)
@sschepens , could you confirm that fasthttp now properly handles Content-Encoding: deflate
?
from fasthttp.
As for @klauspost 's compress library, I'll look into it later.
from fasthttp.
AFAIR there are different opinions on what deflate
means, which is why Content-Encoding: gzip
is generally preferred.
Found a some information from Mark Adler:
[]...
However early Microsoft servers would incorrectly deliver raw deflate for "Deflate" (i.e. just RFC 1951 data without the zlib RFC 1950 wrapper). This caused problems, browsers had to try it both ways, and in the end it was simply more reliable to only use gzip.The impact in bandwidth and execution time to use gzip instead of "Deflate" (zlib), is relatively small. So there we are and there it is likely to remain.
The difference is 12 more bytes for gzip and slightly more CPU time to calculate a CRC instead of an Adler-32.
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.
from fasthttp.
@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.
from fasthttp.
@klauspost , are there chances for the integration of your compression performance improvements into standard Go library?
from fasthttp.
@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.
from fasthttp.
Substituted standard compress library with https://github.com/klauspost/compress
from fasthttp.
👍
from fasthttp.
Related Issues (20)
- Fix rapid reset of fasthttp is vulnerable HOT 2
- Is there a way to send early hints from fasthttp server? HOT 1
- Bug: Redirect location is always normalized
- why skip err check in request.URI HOT 4
- benchmark panics on client timing HOT 2
- why release v1.49.0 is marked as latest? HOT 2
- Question regarding streaming large bodies HOT 2
- how to use readLimitBody, i want to disable preParseMultipartForm HOT 4
- overflown -> overflowed
- Issue: Default Path Not Set in FastHTTP Client for URIs with Only Query Parameters HOT 1
- write: broken pipe HOT 8
- Possible race condition on fasthttp.RequestCtx
- custom dialer in fasthttp.Client does not respect request timeout HOT 3
- Question regarding TCPDialer and KeepAlive HOT 1
- FR: Callback when response is written HOT 7
- Fasthttp WSL 2.0 request timeout. HOT 3
- Code Leaks Memory on FreeBSD, but not on Linux HOT 4
- [Question]How to get the final real url after redirecting using DoRedirects?
- Path Traversal Attacks on Windows HOT 7
- HEAD request hangs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fasthttp.