Skip to content

Expose compression level on CompressionLayer #245

@Zerowalker

Description

@Zerowalker

Feature Request

Motivation

Being able to set the compression level will allow one to tweak the settings for optimal speed/compression.
It can be quite a big difference in speed mostly, especially if things are at max.

Proposal

My thoughts are that with_quality is exposed from async_compression.
https://docs.rs/async-compression/latest/src/async_compression/macros.rs.html#19

The interesting one is the Level::Precise so just having access to that should give much of the customization
https://docs.rs/async-compression/latest/src/async_compression/lib.rs.html#208

Alternatives

Haven't tried it but i guess one could manually implement their own compression layer,
or do the compression in the request handler.
I believe it would be quite unnecessary to do that workaround when there's already a CompressionLayer available.

:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-easyCall for participation: Experience needed to fix: Easy / not muchE-help-wantedCall for participation: Help is requested to fix this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions