[−][src]Struct libflate::deflate::EncodeOptions
Options for a DEFLATE encoder.
Methods
impl EncodeOptions<DefaultLz77Encoder>
[src]
impl EncodeOptions<DefaultLz77Encoder>
pub fn new() -> Self
[src]
pub fn new() -> Self
Makes a default instance.
Examples
use libflate::deflate::{Encoder, EncodeOptions}; let options = EncodeOptions::new(); let encoder = Encoder::with_options(Vec::new(), options);
impl<E> EncodeOptions<E> where
E: Lz77Encode,
[src]
impl<E> EncodeOptions<E> where
E: Lz77Encode,
pub fn with_lz77(lz77: E) -> Self
[src]
pub fn with_lz77(lz77: E) -> Self
Specifies the LZ77 encoder used to compress input data.
Example
use libflate::lz77::DefaultLz77Encoder; use libflate::deflate::{Encoder, EncodeOptions}; let options = EncodeOptions::with_lz77(DefaultLz77Encoder::new()); let encoder = Encoder::with_options(Vec::new(), options);
pub fn no_compression(self) -> Self
[src]
pub fn no_compression(self) -> Self
Disables LZ77 compression.
Example
use libflate::lz77::DefaultLz77Encoder; use libflate::deflate::{Encoder, EncodeOptions}; let options = EncodeOptions::new().no_compression(); let encoder = Encoder::with_options(Vec::new(), options);
pub fn block_size(self, size: usize) -> Self
[src]
pub fn block_size(self, size: usize) -> Self
Specifies the hint of the size of a DEFLATE block.
The default value is DEFAULT_BLOCK_SIZE
.
Example
use libflate::deflate::{Encoder, EncodeOptions}; let options = EncodeOptions::new().block_size(512 * 1024); let encoder = Encoder::with_options(Vec::new(), options);
pub fn fixed_huffman_codes(self) -> Self
[src]
pub fn fixed_huffman_codes(self) -> Self
Specifies to compress with fixed huffman codes.
Example
use libflate::deflate::{Encoder, EncodeOptions}; let options = EncodeOptions::new().fixed_huffman_codes(); let encoder = Encoder::with_options(Vec::new(), options);
Trait Implementations
impl<E: Debug> Debug for EncodeOptions<E>
[src]
impl<E: Debug> Debug for EncodeOptions<E>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<E: Clone> Clone for EncodeOptions<E>
[src]
impl<E: Clone> Clone for EncodeOptions<E>
fn clone(&self) -> EncodeOptions<E>
[src]
fn clone(&self) -> EncodeOptions<E>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<E: PartialEq> PartialEq for EncodeOptions<E>
[src]
impl<E: PartialEq> PartialEq for EncodeOptions<E>
fn eq(&self, other: &EncodeOptions<E>) -> bool
[src]
fn eq(&self, other: &EncodeOptions<E>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &EncodeOptions<E>) -> bool
[src]
fn ne(&self, other: &EncodeOptions<E>) -> bool
This method tests for !=
.
impl<E: Eq> Eq for EncodeOptions<E>
[src]
impl<E: Eq> Eq for EncodeOptions<E>
impl<E: Hash> Hash for EncodeOptions<E>
[src]
impl<E: Hash> Hash for EncodeOptions<E>
fn hash<__HE: Hasher>(&self, state: &mut __HE)
[src]
fn hash<__HE: Hasher>(&self, state: &mut __HE)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for EncodeOptions<DefaultLz77Encoder>
[src]
impl Default for EncodeOptions<DefaultLz77Encoder>
Auto Trait Implementations
impl<E> Send for EncodeOptions<E> where
E: Send,
impl<E> Send for EncodeOptions<E> where
E: Send,
impl<E> Sync for EncodeOptions<E> where
E: Sync,
impl<E> Sync for EncodeOptions<E> where
E: Sync,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more