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

Class MetaString

python/pyfory/meta/metastring.py:49–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49class MetaString:
50 def __init__(
51 self,
52 original: str,
53 encoding: Encoding,
54 encoded_data: bytes,
55 length: int,
56 special_char1: str = ".",
57 special_char2: str = "|",
58 ):
59 self.original = original
60 self.encoding = encoding
61 self.encoded_data = encoded_data
62 self.length = length
63 self.special_char1 = special_char1
64 self.special_char2 = special_char2
65 if self.encoding != Encoding.UTF_8:
66 self.strip_last_char = (encoded_data[0] & 0x80) != 0
67 else:
68 self.strip_last_char = False
69
70
71class MetaStringDecoder:

Callers 2

encodeMethod · 0.70
encode_with_encodingMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected