usecrate::mem::{CompressError, DecompressError, FlushCompress, FlushDecompress, Status}; usecrate::Compression; use std::mem::MaybeUninit;
fn initialize_buffer(output: &mut [MaybeUninit<u8>]) -> &='color:red'>mut [u8] { // SAFETY: Here we zero-initialize the output and cast it to [u8] unsafe {
output.as_mut_ptr().write_bytes(0, output.len());
&mut *(output as *mut [MaybeUninit<u8>] as *mut [u8])
}
}
/// Traits specifying the interface of the backends. /// /// Sync + Send are added as a condition to ensure they are available /// for the frontend. pubtrait Backend: Sync + Send { fn total_in(&self) -> u64; fn total_out(&self) -> u64;
}
// Default to Rust implementation unless explicitly opted in to a different backend. #[cfg(feature = "any_zlib")] mod c; #[cfg(feature = "any_zlib")] pubuseself::c::*;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.