pub struct TarGzDataFormat { /* private fields */ }Expand description
Combined tar.gz format implemented by composing the existing
TarDataFormat and GzipDataFormat: marshal = gzip(tar(body)) and
unmarshal = tar(gzip(body)). The inner configs carry the outer caps so
the composition is behaviorally identical to running the two formats in
sequence.
Implementations§
Source§impl TarGzDataFormat
impl TarGzDataFormat
pub fn new(config: TarGzConfig) -> Self
Trait Implementations§
Source§impl Clone for TarGzDataFormat
impl Clone for TarGzDataFormat
Source§fn clone(&self) -> TarGzDataFormat
fn clone(&self) -> TarGzDataFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DataFormat for TarGzDataFormat
impl DataFormat for TarGzDataFormat
Source§fn marshal(&self, body: Body) -> Result<Body, CamelError>
fn marshal(&self, body: Body) -> Result<Body, CamelError>
gzip(tar(body)): the TAR layer writes one regular-file entry named
payload — never an attacker-controlled path — and enforces the
raw-body input cap; the gzip layer compresses the archive so tar.gz
output decodes through gzip then tar.
Source§fn unmarshal(&self, body: Body) -> Result<Body, CamelError>
fn unmarshal(&self, body: Body) -> Result<Body, CamelError>
tar(gzip(body)): the gzip layer first caps the full decoded stream
at max_decompressed_size, then the TAR layer performs regular-file
selection and the allow_multi_entry policy. Names are never used
for I/O and non-regular entries are skipped without materializing
their payload (path-confinement precedent rc-0ks57; v1 performs no
disk I/O).
fn name(&self) -> &str
Source§fn marshal_in_exchange(
&self,
exchange: &mut Exchange,
body: Body,
) -> Result<Body, CamelError>
fn marshal_in_exchange( &self, exchange: &mut Exchange, body: Body, ) -> Result<Body, CamelError>
marshal.
Override when the format needs Exchange context (e.g., writing
metadata headers like CamelCsvHeaderRecord).Source§fn unmarshal_in_exchange(
&self,
exchange: &mut Exchange,
body: Body,
) -> Result<Body, CamelError>
fn unmarshal_in_exchange( &self, exchange: &mut Exchange, body: Body, ) -> Result<Body, CamelError>
unmarshal.
Override when the format needs Exchange context (e.g., capturing
metadata headers like CamelCsvHeaderRecord).