Skip to content

Commit

Permalink
Add ContentEncoding::zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored and seanmonstar committed Jun 10, 2024
1 parent 690cc45 commit 2298faa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/common/content_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use crate::util::FlatCsv;
///
/// * `gzip`
/// * `br`
/// * `zstd`
///
/// # Examples
///
Expand Down Expand Up @@ -53,6 +54,12 @@ impl ContentEncoding {
ContentEncoding(HeaderValue::from_static("br").into())
}

/// A constructor to easily create a `Content-Encoding: zstd` header.
#[inline]
pub fn zstd() -> ContentEncoding {
ContentEncoding(HeaderValue::from_static("zstd").into())
}

/// Check if this header contains a given "coding".
///
/// This can be used with these argument types:
Expand Down

0 comments on commit 2298faa

Please # to comment.