[−][src]Struct zstd_seekable::SeekableCStream
The type of seekable compressors.
Implementations
impl SeekableCStream
[src]
pub fn new(level: usize, frame_size: usize) -> Result<Self, Error>
[src]
Create a compressor with the given level and frame size. When seeking in the file, frames are decompressed one by one, so this should be chosen of a size similar to the chunks that will be decompressed.
pub fn compress(
&mut self,
output: &mut [u8],
input: &[u8]
) -> Result<(usize, usize), Error>
[src]
&mut self,
output: &mut [u8],
input: &[u8]
) -> Result<(usize, usize), Error>
Compress one chunk of input, and write it into the output. The output
array must be large enough to hold the result. If successful, this function returns two integers (out_pos, in_pos)
, where out_pos
is the number of bytes written in output
, and in_pos
is the number of input bytes consumed.
pub fn end_stream(&mut self, output: &mut [u8]) -> Result<usize, Error>
[src]
Finish writing the message, i.e. write the remaining pending block.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SeekableCStream
impl !Sync for SeekableCStream
impl Unpin for SeekableCStream
impl UnwindSafe for SeekableCStream
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>,