Skip to content
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

Snappy integration #1871

Open
xamgore opened this issue Sep 14, 2021 · 3 comments
Open

Snappy integration #1871

xamgore opened this issue Sep 14, 2021 · 3 comments
Labels
external The issue related to an external project

Comments

@xamgore
Copy link
Contributor

xamgore commented Sep 14, 2021

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.

@szmarczak
Copy link
Collaborator

This is a non standard feature. It would be best if this was a Got plugin instead.

@xamgore
Copy link
Contributor Author

xamgore commented Sep 15, 2021

Do you mean a plugin defining afterResponse hook?

@szmarczak
Copy link
Collaborator

Hm... I haven't thought how to do it properly. Maybe there should be an option to transform the data 🤔

@szmarczak szmarczak added the external The issue related to an external project label Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The issue related to an external project
Projects
None yet
Development

No branches or pull requests

2 participants