MCPcopy Index your code
hub / github.com/RustPython/RustPython / compress_vec

Method compress_vec

crates/stdlib/src/zlib.rs:447–457  ·  view source on GitHub ↗
(
            &mut self,
            input: &[u8],
            output: &mut Vec<u8>,
            flush: Self::Flush,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

445 const DEF_BUF_SIZE: usize = DEF_BUF_SIZE;
446
447 fn compress_vec(
448 &mut self,
449 input: &[u8],
450 output: &mut Vec<u8>,
451 flush: Self::Flush,
452 vm: &VirtualMachine,
453 ) -> PyResult<Self::Status> {
454 self.compress
455 .compress_vec(input, output, flush)
456 .map_err(|_| new_zlib_error("error while compressing", vm))
457 }
458
459 fn total_in(&mut self) -> usize {
460 self.compress.total_in() as usize

Callers

nothing calls this directly

Calls 1

new_zlib_errorFunction · 0.85

Tested by

no test coverage detected