MCPcopy Create free account
hub / github.com/LaihoE/Python-demoparser / decode_string

Method decode_string

src/parsing/read_bits.rs:97–106  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

95
96 #[inline(always)]
97 pub fn decode_string(&mut self) -> Option<String> {
98 let mut length = self.read_nbits(9)?;
99 if length == 0 {
100 return Some("".to_string());
101 }
102 if length >= (1 << 9) {
103 length = (1 << 9) - 1
104 }
105 Some(self.read_string(length.try_into().unwrap()).unwrap())
106 }
107 #[inline(always)]
108 pub fn decode(&mut self, prop: &Prop) -> Option<PropData> {
109 match prop.p_type {

Callers 1

decodeMethod · 0.80

Calls 2

read_nbitsMethod · 0.80
read_stringMethod · 0.45

Tested by

no test coverage detected