Struct libflate::deflate::EncodeOptions [−][src]
Options for a DEFLATE encoder.
Implementations
impl EncodeOptions<DefaultLz77Encoder>
[src]
pub fn new() -> Self
[src]
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]
E: Lz77Encode,
pub fn with_lz77(lz77: E) -> Self
[src]
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]
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]
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]
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: Clone> Clone for EncodeOptions<E>
[src]
fn clone(&self) -> EncodeOptions<E>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E: Debug> Debug for EncodeOptions<E>
[src]
impl Default for EncodeOptions<DefaultLz77Encoder>
[src]
impl<E: Eq> Eq for EncodeOptions<E>
[src]
impl<E: Hash> Hash for EncodeOptions<E>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<E: PartialEq> PartialEq<EncodeOptions<E>> for EncodeOptions<E>
[src]
fn eq(&self, other: &EncodeOptions<E>) -> bool
[src]
fn ne(&self, other: &EncodeOptions<E>) -> bool
[src]
impl<E> StructuralEq for EncodeOptions<E>
[src]
impl<E> StructuralPartialEq for EncodeOptions<E>
[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for EncodeOptions<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> Send for EncodeOptions<E> where
E: Send,
E: Send,
impl<E> Sync for EncodeOptions<E> where
E: Sync,
E: Sync,
impl<E> Unpin for EncodeOptions<E> where
E: Unpin,
E: Unpin,
impl<E> UnwindSafe for EncodeOptions<E> where
E: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,