Struct zstd::stream::raw::Encoder [−][src]
An in-memory encoder for streams of data.
Implementations
impl Encoder<'static>
[src]
pub fn new(level: i32) -> Result<Self>
[src]
Creates a new encoder.
pub fn with_dictionary(level: i32, dictionary: &[u8]) -> Result<Self>
[src]
Creates a new encoder initialized with the given dictionary.
impl<'a> Encoder<'a>
[src]
pub fn with_prepared_dictionary<'b>(
dictionary: &EncoderDictionary<'b>
) -> Result<Self> where
'b: 'a,
[src]
dictionary: &EncoderDictionary<'b>
) -> Result<Self> where
'b: 'a,
Creates a new encoder using an existing EncoderDictionary
.
pub fn set_parameter(&mut self, parameter: CParameter) -> Result<()>
[src]
Sets a compression parameter for this encoder.
Trait Implementations
impl<'a> Operation for Encoder<'a>
[src]
fn run(
&mut self,
input: &mut InBuffer<'_>,
output: &mut OutBuffer<'_>
) -> Result<usize>
[src]
&mut self,
input: &mut InBuffer<'_>,
output: &mut OutBuffer<'_>
) -> Result<usize>
fn flush(&mut self, output: &mut OutBuffer<'_>) -> Result<usize>
[src]
fn finish(
&mut self,
output: &mut OutBuffer<'_>,
_finished_frame: bool
) -> Result<usize>
[src]
&mut self,
output: &mut OutBuffer<'_>,
_finished_frame: bool
) -> Result<usize>
fn reinit(&mut self) -> Result<()>
[src]
fn run_on_buffers(&mut self, input: &[u8], output: &mut [u8]) -> Result<Status>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Encoder<'a>
impl<'a> Send for Encoder<'a>
impl<'a> !Sync for Encoder<'a>
impl<'a> Unpin for Encoder<'a>
impl<'a> UnwindSafe for Encoder<'a>
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, 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>,