#[repr(u32)]pub enum BlockFlags {
DontCompress = 1,
BlockAlign = 2,
DontFragment = 4,
DontDeduplicate = 8,
IgnoreSparse = 16,
DontHash = 32,
}
Expand description
Variants§
DontCompress = 1
Don’t compress file data.
By default, files are compressed, and the compressed version is stored in the archive if it is smaller than the uncompressed version. Setting this flag will force the file to be stored uncompressed.
BlockAlign = 2
Align the file data to device blocks.
If set, padding will be added before and after this file’s data blocks so that it is aligned to the blocks of the underlying disk.
DontFragment = 4
Store the tail of the file in a regular data block rather than a fragment block.
The compressed content of a file to be written to an archive is split into equally-sized blocks and stored as “data blocks”. The final chunk is usually smaller than the rest, so these final chunks are collected from multiple files are collected and stored together in separate “fragment blocks” as an optimization. If there is a reason for the entire file’s contents to be stored together, fragmentation can be disabled using this flag.
DontDeduplicate = 8
Don’t deduplicated data blocks for this file.
If two files contain an identical data block, the block will be stored only once and both files’ block indices will point to this single block. The user can force all blocks of a file to be stored by setting this flag.
IgnoreSparse = 16
Don’t elide sparse blocks.
If a block of a file contains only zeros, it will not be stored at all and the file’s block index will mark that the block is all-zero. This behavior can be disabled so that a zero block will be written by setting this flag.
DontHash = 32
Don’t compute block checksums for this file.
Each data block is checksummed to verify data integrity unless this flag is set.