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

Method decode

crates/compiler-core/src/frozen.rs:20–22  ·  view source on GitHub ↗
(&self, bag: Bag)

Source from the content-addressed store, hash-verified

18 /// Decode a frozen code object
19 #[inline]
20 pub fn decode<Bag: AsBag>(&self, bag: Bag) -> CodeObject<<Bag::Bag as ConstantBag>::Constant> {
21 Self::_decode(self.bytes.as_ref(), bag.as_bag())
22 }
23 fn _decode<Bag: ConstantBag>(data: &[u8], bag: Bag) -> CodeObject<Bag::Constant> {
24 let decompressed = lz4_flex::decompress_size_prepended(data)
25 .expect("deserialize frozen CodeObject failed");

Callers 1

into_iterMethod · 0.45

Calls 4

read_u32Method · 0.80
as_refMethod · 0.45
as_bagMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected