pub struct PackOptions {Show 22 fields
pub chunk: ChunkParams,
pub block_size: u32,
pub level: i32,
pub codec: CodecChoice,
pub effort: u8,
pub train_dict: bool,
pub dict_size: usize,
pub dict_warmup: usize,
pub container_aware: bool,
pub password: Option<String>,
pub kdf: KdfParams,
pub sign_seed: Option<[u8; 32]>,
pub keep_mtime: bool,
pub timestamp: bool,
pub profile: String,
pub limits: Limits,
pub batch: usize,
pub references: Vec<PathBuf>,
pub recipients: Vec<Recipient>,
pub canonical: bool,
pub delta: bool,
pub jpeg_recompression: bool,
}Fields§
§chunk: ChunkParams§block_size: u320 = granular (one chunk per blob, best random access); otherwise consecutive unique chunks are compressed together in blocks of up to this many bytes (default 1 MiB).
level: i32§codec: CodecChoiceCodec(s) the packer may use per block.
effort: u8Codec-choice effort for CodecChoice::Best, 1..=5 (codec::CodecOptions::effort): 1 = zstd
only, 2 = zstd or xz decided on a sample of each block, 3 = zstd, xz or PPMd decided on a
sample, 4 = 3 plus an xz check when PPMd wins, 5 = every codec on every block (default).
Blocks of at most 128 KiB always run the full trial. Not recorded in the archive.
train_dict: boolTrain a zstd dictionary on the first dict_warmup bytes of unique chunks (granular mode only).
dict_size: usize§dict_warmup: usize§container_aware: bool§password: Option<String>§kdf: KdfParams§sign_seed: Option<[u8; 32]>§keep_mtime: bool§timestamp: bool§profile: String§limits: Limits§batch: usizeBlocks compressed in parallel per batch (0 = number of CPU threads).
references: Vec<PathBuf>Reference archives: chunks already present in them are referenced, not stored.
recipients: Vec<Recipient>Hybrid X25519 + ML-KEM-768 recipients (public key bytes); each gets its own stanza.
canonical: boolAlso store canonical views (DOCX -> Markdown, PDF -> text) as derived entries under
.tsaur/views/ (hybrid fidelity: originals stay bit-exact, views are pre-computed).
delta: boolDelta coding: blocks of an entry that looks like a new version of an earlier entry (same path in a reference archive, or a similarly named earlier entry of this archive) are also tried with zstd against that earlier content as dictionary; the smaller encoding wins.
jpeg_recompression: boolRecompress JPEG files and PDF DCTDecode images with Lepton when the build has it.
false (pack --no-lepton) stores them as they are, so that every build, including one
without the lepton feature, can read the archive.
Trait Implementations§
Source§impl Clone for PackOptions
impl Clone for PackOptions
Source§impl Debug for PackOptions
impl Debug for PackOptions
Auto Trait Implementations§
impl Freeze for PackOptions
impl RefUnwindSafe for PackOptions
impl Send for PackOptions
impl Sync for PackOptions
impl Unpin for PackOptions
impl UnsafeUnpin for PackOptions
impl UnwindSafe for PackOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DefaultBoxed for Twhere
T: Default,
impl<T> DefaultBoxed for Twhere
T: Default,
Source§unsafe fn default_in_place(ptr: *mut T)
unsafe fn default_in_place(ptr: *mut T)
Source§fn default_boxed() -> Box<Self>where
Self: Sized,
fn default_boxed() -> Box<Self>where
Self: Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more