Skip to content

Commit 2298faa

Browse files
paolobarboliniseanmonstar
authored andcommitted
Add ContentEncoding::zstd
1 parent 690cc45 commit 2298faa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/common/content_encoding.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use crate::util::FlatCsv;
2424
///
2525
/// * `gzip`
2626
/// * `br`
27+
/// * `zstd`
2728
///
2829
/// # Examples
2930
///
@@ -53,6 +54,12 @@ impl ContentEncoding {
5354
ContentEncoding(HeaderValue::from_static("br").into())
5455
}
5556

57+
/// A constructor to easily create a `Content-Encoding: zstd` header.
58+
#[inline]
59+
pub fn zstd() -> ContentEncoding {
60+
ContentEncoding(HeaderValue::from_static("zstd").into())
61+
}
62+
5663
/// Check if this header contains a given "coding".
5764
///
5865
/// This can be used with these argument types:

0 commit comments

Comments
 (0)