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

Method decompress

crates/stdlib/src/lzma.rs:635–646  ·  view source on GitHub ↗
(&self, args: DecompressArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

633 impl LZMADecompressor {
634 #[pymethod]
635 fn decompress(&self, args: DecompressArgs, vm: &VirtualMachine) -> PyResult<Vec<u8>> {
636 let max_length = args.max_length();
637 let data = &*args.data();
638
639 let mut state = self.state.lock();
640 state
641 .decompress(data, max_length, BUFSIZ, vm)
642 .map_err(|e| match e {
643 DecompressError::Decompress(err) => catch_lzma_error(err, vm),
644 DecompressError::Eof(err) => err.to_pyexception(vm),
645 })
646 }
647
648 #[pygetset]
649 fn check(&self) -> i32 {

Callers

nothing calls this directly

Calls 5

catch_lzma_errorFunction · 0.85
max_lengthMethod · 0.80
dataMethod · 0.45
lockMethod · 0.45
to_pyexceptionMethod · 0.45

Tested by

no test coverage detected