Skip to main content

split_tar_gz_bytes

Function split_tar_gz_bytes 

Source
pub fn split_tar_gz_bytes(
    parent: Exchange,
    bytes: Bytes,
    config: TarSplitConfig,
) -> Pin<Box<dyn Stream<Item = Result<Exchange, CamelError>> + Send>>
Expand description

Split a single-member TAR.GZ stream into a stream of Exchanges, one per regular-file entry in header order.

The compressed-input cap is checked before decompression is accepted, the input is then decoded through the bounded single-member GZIP decoder shared with GzipDataFormat. The decode budget is the payload cap (max_total_decoded_size) plus a bounded TAR framing allowance, so the inflate is bounded without counting framing against the payload cap; the resulting TAR bytes run through the same bounded entry reader as plain TAR splitting, which enforces the payload accounting authoritatively. A concatenated multi-member GZIP stream is rejected instead of silently splitting only the first member.