pub struct PackTransformFlags {
pub encrypt: bool,
pub train_dict: bool,
pub parallel: bool,
}Expand description
Configuration parameters for archive packing.
This struct encapsulates all settings for the packing process. It’s designed to be easily constructed from CLI arguments or programmatic APIs.
§Examples
use hexz_ops::pack::PackConfig;
use std::path::PathBuf;
// Basic configuration with defaults
let config = PackConfig {
input: PathBuf::from("data/"),
output: PathBuf::from("archive.hxz"),
..Default::default()
};
// Advanced configuration with CDC and encryption
let advanced = PackConfig {
input: PathBuf::from("data/"),
output: PathBuf::from("archive.hxz"),
compression: "zstd".to_string(),
password: Some("secret".to_string()),
min_chunk: Some(16384),
avg_chunk: Some(65536),
max_chunk: Some(131072),
transform: hexz_ops::pack::PackTransformFlags { encrypt: true, ..Default::default() },
..Default::default()
};Feature flags controlling how data is transformed during packing.
Fields§
§encrypt: boolEnable encryption.
train_dict: boolTrain a compression dictionary (zstd only).
parallel: boolEnable parallel compression (use multiple CPU cores).
Trait Implementations§
Source§impl Clone for PackTransformFlags
impl Clone for PackTransformFlags
Source§fn clone(&self) -> PackTransformFlags
fn clone(&self) -> PackTransformFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackTransformFlags
impl Debug for PackTransformFlags
Source§impl Default for PackTransformFlags
impl Default for PackTransformFlags
Source§fn default() -> PackTransformFlags
fn default() -> PackTransformFlags
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PackTransformFlags
impl RefUnwindSafe for PackTransformFlags
impl Send for PackTransformFlags
impl Sync for PackTransformFlags
impl Unpin for PackTransformFlags
impl UnsafeUnpin for PackTransformFlags
impl UnwindSafe for PackTransformFlags
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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