MCPcopy Create free account
hub / github.com/alibaba/euler / read_string

Function read_string

euler/tools/util.py:72–80  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

70
71
72def read_string(s):
73 slen = struct.unpack('I', s[:4])[0]
74 s = s[4:]
75 b = str(slen) + 's'
76 ss = struct.unpack(b, s[:slen])[0]
77 s = s[slen:]
78 if isinstance(ss, bytes):
79 ss = ss.decode('utf-8')
80 return ss, s
81
82
83def write_correct_data(valueType, value):

Callers 1

read_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected