pub struct BlobCompressionContextHeader { /* private fields */ }Expand description
On disk format for blob compression context table header.
Blob compression context table contains compression information for all chunks in the blob. The compression context table header will be written into the data blob in plaintext mode, and can be used as marker to locate the compression context table. All fields of compression context table header should be encoded in little-endian format.
The compression context table and header are arranged in the data blob as follows:
chunk data | compression context table | [ZRan context table | ZRan dictionary] | compression context table header
Implementations§
Source§impl BlobCompressionContextHeader
impl BlobCompressionContextHeader
Sourcepub fn has_feature(&self, feature: BlobFeatures) -> bool
pub fn has_feature(&self, feature: BlobFeatures) -> bool
Check whether a blob feature is set or not.
Sourcepub fn ci_compressor(&self) -> Algorithm
pub fn ci_compressor(&self) -> Algorithm
Get compression algorithm to process chunk compression information array.
Sourcepub fn set_ci_compressor(&mut self, algo: Algorithm)
pub fn set_ci_compressor(&mut self, algo: Algorithm)
Set compression algorithm to process chunk compression information array.
Sourcepub fn ci_entries(&self) -> u32
pub fn ci_entries(&self) -> u32
Get number of entries in chunk compression information array.
Sourcepub fn set_ci_entries(&mut self, entries: u32)
pub fn set_ci_entries(&mut self, entries: u32)
Set number of entries in chunk compression information array.
Sourcepub fn ci_compressed_offset(&self) -> u64
pub fn ci_compressed_offset(&self) -> u64
Get offset of compressed chunk compression information array.
Sourcepub fn set_ci_compressed_offset(&mut self, offset: u64)
pub fn set_ci_compressed_offset(&mut self, offset: u64)
Set offset of compressed chunk compression information array.
Sourcepub fn ci_compressed_size(&self) -> u64
pub fn ci_compressed_size(&self) -> u64
Get size of compressed chunk compression information array.
Sourcepub fn set_ci_compressed_size(&mut self, size: u64)
pub fn set_ci_compressed_size(&mut self, size: u64)
Set size of compressed chunk compression information array.
Sourcepub fn ci_uncompressed_size(&self) -> u64
pub fn ci_uncompressed_size(&self) -> u64
Get size of uncompressed chunk compression information array.
Sourcepub fn set_ci_uncompressed_size(&mut self, size: u64)
pub fn set_ci_uncompressed_size(&mut self, size: u64)
Set size of uncompressed chunk compression information array.
Sourcepub fn ci_zran_count(&self) -> u32
pub fn ci_zran_count(&self) -> u32
Get ZRan context information entry count.
Sourcepub fn set_ci_zran_count(&mut self, count: u32)
pub fn set_ci_zran_count(&mut self, count: u32)
Set ZRan context information entry count.
Sourcepub fn ci_zran_offset(&self) -> u64
pub fn ci_zran_offset(&self) -> u64
Get offset of ZRan context information table.
Sourcepub fn set_ci_zran_offset(&mut self, offset: u64)
pub fn set_ci_zran_offset(&mut self, offset: u64)
Set offset of ZRan context information table.
Sourcepub fn ci_zran_size(&self) -> u64
pub fn ci_zran_size(&self) -> u64
Get size of ZRan context information table and dictionary table.
Sourcepub fn set_ci_zran_size(&mut self, size: u64)
pub fn set_ci_zran_size(&mut self, size: u64)
Set size of ZRan context information table and dictionary table.
Sourcepub fn is_4k_aligned(&self) -> bool
pub fn is_4k_aligned(&self) -> bool
Check whether uncompressed chunks are 4k aligned.
Sourcepub fn set_aligned(&mut self, aligned: bool)
pub fn set_aligned(&mut self, aligned: bool)
Set flag indicating whether uncompressed chunks are aligned.
Sourcepub fn set_inlined_fs_meta(&mut self, inlined: bool)
pub fn set_inlined_fs_meta(&mut self, inlined: bool)
Set flag indicating whether RAFS meta is inlined in the data blob.
Sourcepub fn set_chunk_info_v2(&mut self, enable: bool)
pub fn set_chunk_info_v2(&mut self, enable: bool)
Set flag indicating whether chunk compression information format v2 is used or not.
Sourcepub fn set_ci_zran(&mut self, enable: bool)
pub fn set_ci_zran(&mut self, enable: bool)
Set flag indicating whether it’s a ZRan blob or not.
Sourcepub fn set_separate_blob(&mut self, enable: bool)
pub fn set_separate_blob(&mut self, enable: bool)
Set flag indicating whether blob.data and blob.meta are stored in separated blobs.
Sourcepub fn set_ci_batch(&mut self, enable: bool)
pub fn set_ci_batch(&mut self, enable: bool)
Set flag indicating whether it’s a blob for batch chunk or not.
Sourcepub fn set_inlined_chunk_digest(&mut self, enable: bool)
pub fn set_inlined_chunk_digest(&mut self, enable: bool)
Set flag indicating whether chunk digest is inlined in the data blob or not.
Sourcepub fn set_has_tar_header(&mut self, enable: bool)
pub fn set_has_tar_header(&mut self, enable: bool)
Set flag indicating new blob format with tar headers.
Sourcepub fn set_has_toc(&mut self, enable: bool)
pub fn set_has_toc(&mut self, enable: bool)
Set flag indicating new blob format with toc headers.
Sourcepub fn set_cap_tar_toc(&mut self, enable: bool)
pub fn set_cap_tar_toc(&mut self, enable: bool)
Set flag indicating having inlined-meta capability.
Sourcepub fn set_tarfs(&mut self, enable: bool)
pub fn set_tarfs(&mut self, enable: bool)
Set flag indicating the blob is for RAFS filesystem in TARFS mode.
Sourcepub fn set_encrypted(&mut self, enable: bool)
pub fn set_encrypted(&mut self, enable: bool)
Set flag indicating the blob is encrypted.
Sourcepub fn set_external(&mut self, external: bool)
pub fn set_external(&mut self, external: bool)
Set flag indicating the blob is external.
Sourcepub fn set_is_chunkdict_generated(&mut self, enable: bool)
pub fn set_is_chunkdict_generated(&mut self, enable: bool)
Set flag indicating whether it’s a blob for batch chunk or not.
Trait Implementations§
Source§impl Clone for BlobCompressionContextHeader
impl Clone for BlobCompressionContextHeader
Source§fn clone(&self) -> BlobCompressionContextHeader
fn clone(&self) -> BlobCompressionContextHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more