pub struct ChunkCompressionOptions { /* private fields */ }
Expand description
Common parameters to configure how chunks are compressed.
use ba2::fo4::{ChunkCompressionOptions, CompressionFormat, CompressionLevel};
// Configure for FO4/FO76
let _ = ChunkCompressionOptions::builder()
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::FO4)
.build();
// Configure for FO4 on the xbox
let _ = ChunkCompressionOptions::builder()
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::FO4Xbox)
.build();
// Configure for SF, GNRL format
let _ = ChunkCompressionOptions::builder()
.compression_format(CompressionFormat::Zip)
.compression_level(CompressionLevel::SF)
.build();
// Configure for SF, DX10 format
let _ = ChunkCompressionOptions::builder()
.compression_format(CompressionFormat::LZ4)
.build();
Implementations§
Source§impl CompressionOptions
impl CompressionOptions
pub fn builder() -> CompressionOptionsBuilder
pub fn compression_format(&self) -> CompressionFormat
pub fn compression_level(&self) -> CompressionLevel
Trait Implementations§
Source§impl Clone for CompressionOptions
impl Clone for CompressionOptions
Source§fn clone(&self) -> CompressionOptions
fn clone(&self) -> CompressionOptions
Returns a copy 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 CompressionOptions
impl Debug for CompressionOptions
Source§impl Default for CompressionOptions
impl Default for CompressionOptions
Source§fn default() -> CompressionOptions
fn default() -> CompressionOptions
Returns the “default value” for a type. Read more
Source§impl From<&Options> for CompressionOptions
impl From<&Options> for CompressionOptions
Source§fn from(value: &ArchiveOptions) -> Self
fn from(value: &ArchiveOptions) -> Self
Converts to this type from the input type.
Source§impl From<&WriteOptions> for CompressionOptions
impl From<&WriteOptions> for CompressionOptions
Source§fn from(value: &FileWriteOptions) -> Self
fn from(value: &FileWriteOptions) -> Self
Converts to this type from the input type.
Source§impl From<Options> for CompressionOptions
impl From<Options> for CompressionOptions
Source§fn from(value: ArchiveOptions) -> Self
fn from(value: ArchiveOptions) -> Self
Converts to this type from the input type.
Source§impl From<WriteOptions> for CompressionOptions
impl From<WriteOptions> for CompressionOptions
Source§fn from(value: FileWriteOptions) -> Self
fn from(value: FileWriteOptions) -> Self
Converts to this type from the input type.
impl Copy for CompressionOptions
Auto Trait Implementations§
impl Freeze for CompressionOptions
impl RefUnwindSafe for CompressionOptions
impl Send for CompressionOptions
impl Sync for CompressionOptions
impl Unpin for CompressionOptions
impl UnwindSafe for CompressionOptions
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