hyperlane-plugin-compression 23.3.0

A full-duplex opt-in compression middleware plugin for the Hyperlane framework providing bounded request decompression (gzip/deflate/br) and automatic Accept-Encoding response negotiation with MIME filtering and Vary merging.
Documentation
//! hyperlane-plugin-compression
//!
//! Full-duplex opt-in compression middleware for Hyperlane combining bounded
//! request body decompression (`gzip`, `deflate`, `br`) with automatic
//! `Accept-Encoding` response negotiation, MIME filtering, and `Vary` merging.

mod r#const;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#struct::*};

pub(crate) use {r#fn::*, r#static::*};

use std::{borrow::Cow, collections::VecDeque, sync::OnceLock};

use {
    http_compress::Compress,
    hyperlane::{
        ACCEPT_ENCODING, CACHE_CONTROL, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TYPE, Context,
        HttpStatus, Request, Response, ResponseError, ResponseHeaders, ServerHook, Status, Stream,
        VARY, VARY_ACCEPT_ENCODING,
    },
    lombok_macros::*,
};