mz_stream

Struct mz_stream 

Source
#[repr(C)]
pub struct mz_stream {
Show 14 fields pub next_in: *const u8, pub avail_in: c_uint, pub total_in: c_ulong, pub next_out: *mut u8, pub avail_out: c_uint, pub total_out: c_ulong, pub msg: *const c_char, pub state: Option<Box<InternalState>>, pub zalloc: mz_alloc_callback, pub zfree: mz_free_callback, pub opaque: *mut c_void, pub data_type: StateTypeEnum, pub adler: c_ulong, pub reserved: c_ulong,
}
Expand description

Inner stream state containing pointers to the used buffers and internal state.

Fields§

§next_in: *const u8

Pointer to the current start of the input buffer.

§avail_in: c_uint

Length of the input buffer.

§total_in: c_ulong

The total number of input bytes consumed so far.

§next_out: *mut u8

Pointer to the current start of the output buffer.

§avail_out: c_uint

Space in the output buffer.

§total_out: c_ulong

The total number of bytes output so far.

§msg: *const c_char§state: Option<Box<InternalState>>

Compressor or decompressor, if it exists. This is boxed to work with the current C API.

§zalloc: mz_alloc_callback

Allocation function to use for allocating the internal compressor/decompressor. Uses mz_default_alloc_func if set to None.

§zfree: mz_free_callback

Free function to use for allocating the internal compressor/decompressor. Uses mz_default_free_func if None.

§opaque: *mut c_void

Extra data to provide the allocation/deallocation functions. (Not used for the default ones)

§data_type: StateTypeEnum

Whether the stream contains a compressor or decompressor.

§adler: c_ulong

Adler32 checksum of the data that has been compressed or uncompressed.

§reserved: c_ulong

Reserved

Trait Implementations§

Source§

impl Debug for mz_stream

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for mz_stream

Source§

fn default() -> mz_stream

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.