Skip to content

Feature Request: content-encoding: zstd #1148

@logankaser

Description

@logankaser

Major browsers have had zstd support since around mid-2024, and it's starting to slowly become more common,
mostly because of the excellent compression performance.
Personally, I'm interested in it because bevy uses ureq for it's new web asset support, and I have an asset server that can achieve better performance with zstd than what is possible with gzip.

This data is with C libraries, but the Rust implementation numbers are similar:
zlib-rs performance is roughly on par with zlib, the zstd crate is bindings to libzstd.

Library Ratio Compress Decompress
zlib 1.3.1 -1 2.743 105 MB/s 390 MB/s
zstd 1.5.7 -1 2.896 510 MB/s 1550 MB/s

https://caniuse.com/zstd

Anyway, for the short term I'm just going to go with gzip, but I thought, why not let ureq's authors know there is demand?
If you're interested, I could give a PR adding zstd a shot as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions