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

Method get_compressor

crates/stdlib/src/compression.rs:224–228  ·  view source on GitHub ↗
(&mut self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

222 }
223
224 fn get_compressor(&mut self, vm: &VirtualMachine) -> PyResult<&mut C> {
225 self.compressor
226 .as_mut()
227 .ok_or_else(|| C::new_error(USE_AFTER_FINISH_ERR, vm))
228 }
229
230 pub fn compress(&mut self, data: &[u8], vm: &VirtualMachine) -> PyResult<Vec<u8>> {
231 let mut buf = Vec::new();

Callers 2

compressMethod · 0.80
flushMethod · 0.80

Calls 2

ok_or_elseMethod · 0.80
as_mutMethod · 0.45

Tested by

no test coverage detected