A library that negotiates the content encoding of an HTTP answer. It picks the encoding a client asked for out of the encodings that are offered, and tells whether a body of a content type is worth compressing.
usesuper::*;/// The rules that decide which encoding an answer carries.
////// The policy holds no server state, so the same rules can be used by any
/// server that answers with a compressed body.
#[derive(Clone, Debug, Getter)]pubstructCompressionPolicy{/// The encodings that are offered, in the order they are preferred.
pubencodings:Vec<String>,
/// The smallest body that is worth compressing.
#[get(type(copy))]pubmin_size:usize,
}