got
got copied to clipboard
Snappy integration
What problem are you trying to solve?
Speed up the decompression stage for Buffers.
Describe the feature
https://github.com/Brooooooklyn/snappy
Running "Decompress" suite...
Progress: 25%
snappy:
2 771 ops/s, ±1.13%
gzip:
854 ops/s, ±6.99%
deflate:
877 ops/s, ±3.19%
brotli:
638 ops/s, ±2.31% | slowest, 76.98% slower
As I may see, decompress-response operates on streams, though, got.js may exploit snappy when the end-user has decided to receive Buffer instead of working directly with streams.
This is a non standard feature. It would be best if this was a Got plugin instead.
Do you mean a plugin defining afterResponse hook?
Hm... I haven't thought how to do it properly. Maybe there should be an option to transform the data 🤔