pub struct CpuZstd { /* private fields */ }Expand description
CPU zstd codec。level は 1..=22 (zstd-22 は最大圧縮率、時間は長い)。
S4 default は 3 (zstd の通常 default、速度と圧縮率のバランス)。
Implementations§
Trait Implementations§
Source§impl Codec for CpuZstd
impl Codec for CpuZstd
Source§fn compress<'life0, 'async_trait>(
&'life0 self,
input: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(Bytes, ChunkManifest), CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn compress<'life0, 'async_trait>(
&'life0 self,
input: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(Bytes, ChunkManifest), CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
圧縮: 入力 bytes → 圧縮済 bytes + manifest
Source§fn decompress<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Bytes,
manifest: &'life1 ChunkManifest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decompress<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Bytes,
manifest: &'life1 ChunkManifest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
解凍: 圧縮済 bytes + manifest → 元の bytes
Auto Trait Implementations§
impl Freeze for CpuZstd
impl RefUnwindSafe for CpuZstd
impl Send for CpuZstd
impl Sync for CpuZstd
impl Unpin for CpuZstd
impl UnsafeUnpin for CpuZstd
impl UnwindSafe for CpuZstd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more