Struct zstd::stream::raw::Encoder [−][src]
pub struct Encoder { /* fields omitted */ }An in-memory encoder for streams of data.
Implementations
impl Encoder[src]
impl Encoder[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.
pub fn with_prepared_dictionary(
dictionary: &EncoderDictionary<'_>
) -> Result<Self>[src]
dictionary: &EncoderDictionary<'_>
) -> Result<Self>
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 Operation for Encoder[src]
impl Operation for Encoder[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>