Enum avro_rs::Codec [−][src]
pub enum Codec { Null, Deflate, }
The compression codec used to compress blocks.
Variants
Null
The Null
codec simply passes through data uncompressed.
Deflate
The Deflate
codec writes the data block using the deflate algorithm
as specified in RFC 1951, and typically implemented using the zlib library.
Note that this format (unlike the "zlib format" in RFC 1950) does not have a checksum.
Methods
impl Codec
[src]
impl Codec
pub fn compress(&self, stream: &mut Vec<u8>) -> Result<(), Error>
[src]
pub fn compress(&self, stream: &mut Vec<u8>) -> Result<(), Error>
Compress a stream of bytes in-place.
pub fn decompress(&self, stream: &mut Vec<u8>) -> Result<(), Error>
[src]
pub fn decompress(&self, stream: &mut Vec<u8>) -> Result<(), Error>
Decompress a stream of bytes in-place.
Trait Implementations
impl Clone for Codec
[src]
impl Clone for Codec
fn clone(&self) -> Codec
[src]
fn clone(&self) -> Codec
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Codec
[src]
impl Copy for Codec
impl Debug for Codec
[src]
impl Debug for Codec
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 PartialEq for Codec
[src]
impl PartialEq for Codec
fn eq(&self, other: &Codec) -> bool
[src]
fn eq(&self, other: &Codec) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl ToAvro for Codec
[src]
impl ToAvro for Codec
impl FromStr for Codec
[src]
impl FromStr for Codec