Struct ba2::fo4::ChunkCompressionOptions
source · 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 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