MCPcopy Create free account
hub / github.com/apache/fory / _decode_lower_special_char

Method _decode_lower_special_char

python/pyfory/meta/metastring.py:175–196  ·  view source on GitHub ↗

Decodes a single character encoded with LOWER_SPECIAL encoding. Args: char_value (int): The encoded character value. Returns: str: The decoded character.

(self, char_value: int)

Source from the content-addressed store, hash-verified

173 return "".join(decoded)
174
175 def _decode_lower_special_char(self, char_value: int) -> str:
176 """
177 Decodes a single character encoded with LOWER_SPECIAL encoding.
178
179 Args:
180 char_value (int): The encoded character value.
181
182 Returns:
183 str: The decoded character.
184 """
185 if 0 <= char_value <= 25:
186 return chr(ord("a") + char_value)
187 elif char_value == 26:
188 return "."
189 elif char_value == 27:
190 return "_"
191 elif char_value == 28:
192 return "$"
193 elif char_value == 29:
194 return "|"
195 else:
196 raise ValueError(f"Invalid character value for LOWER_SPECIAL: {char_value}")
197
198 def _decode_lower_upper_digit_special_char(self, char_value: int) -> str:
199 """

Callers 1

_decode_lower_specialMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected