diff --git a/src/common/content_encoding.rs b/src/common/content_encoding.rs index 3421ac5c..c218ea96 100644 --- a/src/common/content_encoding.rs +++ b/src/common/content_encoding.rs @@ -24,6 +24,7 @@ use crate::util::FlatCsv; /// /// * `gzip` /// * `br` +/// * `zstd` /// /// # Examples /// @@ -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: