pub struct TarStream<R> { /* private fields */ }Expand description
A strict stream of POSIX-pax or GNU frames sourced from an underlying reader.
Implementations§
Source§impl<R> TarStream<R>
impl<R> TarStream<R>
Sourcepub fn set_max_pax_extension_size(&mut self, max_pax_extension_size: u64)
pub fn set_max_pax_extension_size(&mut self, max_pax_extension_size: u64)
Sets the maximum size accepted for each subsequent pax extension.
A local or global header that declares a larger payload is rejected
before its payload is consumed. Setting the maximum to zero rejects
every nonempty extension. Setting it to u64::MAX removes the
per-extension bound; global extensions remain subject to their
cumulative limit.
Sourcepub fn set_max_global_pax_extensions_size(
&mut self,
max_global_pax_extensions_size: u64,
)
pub fn set_max_global_pax_extensions_size( &mut self, max_global_pax_extensions_size: u64, )
Sets the maximum cumulative size accepted for global pax extensions before one ordinary member.
The total resets after each ordinary member. A global header that would
increase the pending total beyond this limit is rejected before its
payload is consumed. Setting the maximum to zero rejects every nonempty
global extension. Setting it to u64::MAX removes the cumulative
bound; each extension remains subject to its individual limit.
Sourcepub fn set_allow_all_nul_numeric_fields(&mut self, allow: bool)
pub fn set_allow_all_nul_numeric_fields(&mut self, allow: bool)
Sets whether wholly NUL numeric metadata fields may be accepted.
This compatibility option applies to mode, uid, gid, and mtime
in both pax/ustar and GNU ordinary member headers. It is enabled by
default. Disabling it requires each field to use a valid numeric encoding
for its archive family.
Sourcepub fn set_max_gnu_extension_size(&mut self, max_gnu_extension_size: u64)
pub fn set_max_gnu_extension_size(&mut self, max_gnu_extension_size: u64)
Sets the maximum size accepted for each GNU extension.
A GNU extension member that declares a larger payload is rejected before
its payload is consumed. Setting the maximum to zero rejects every nonempty
GNU extension member. Setting it to u64::MAX removes the per-extension bound.
Sourcepub fn format(&self) -> Option<ArchiveFormat>
pub fn format(&self) -> Option<ArchiveFormat>
Returns the selected archive family after the first header is read.