pub struct Stored;Expand description
Compression type 0: the stored bytes.
Trait Implementations§
Source§impl BlockCodec for Stored
impl BlockCodec for Stored
Source§fn decode(
&self,
input: &Bytes,
_: u32,
_: &mut DecodeBuf,
) -> Result<Decoded, Error>
fn decode( &self, input: &Bytes, _: u32, _: &mut DecodeBuf, ) -> Result<Decoded, Error>
Decodes
input, a block’s stored bytes (a slice of the bundle).
uncompressed is blocks-info’s declared size; each codec treats it as
UnityPy does (module docs). The output goes into out, which pays and
checks the caps before it grows, and the codec returns
Decoded::Written; or, with out left empty, the codec returns
Decoded::Input, a range of input (the stored codec), which
decode_block checks and slices. Read moreSource§fn compressor(
&self,
_which: Codec,
_meter: &Arc<Meter>,
) -> Result<Option<Arc<dyn BlockCodec>>, SaveError>
fn compressor( &self, _which: Codec, _meter: &Arc<Meter>, ) -> Result<Option<Arc<dyn BlockCodec>>, SaveError>
Capture a compressor and chunk policy for one payload, when needed.
The default uses this registered codec directly.
Source§fn decode_with_flags(
&self,
input: &Bytes,
uncompressed: u32,
_flags: u32,
out: &mut DecodeBuf,
) -> Result<Decoded, Error>
fn decode_with_flags( &self, input: &Bytes, uncompressed: u32, _flags: u32, out: &mut DecodeBuf, ) -> Result<Decoded, Error>
Decode with the original bundle flags available to extension callbacks.
Native codecs use only their registered compression type.
impl Copy for Stored
Auto Trait Implementations§
impl Forget for Stored
impl Freeze for Stored
impl Move for Stored
impl RefUnwindSafe for Stored
impl Send for Stored
impl Sync for Stored
impl Unpin for Stored
impl UnsafeUnpin for Stored
impl UnwindSafe for Stored
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