Added replay ability
This commit is contained in:
@@ -135,10 +135,16 @@ def deserialize18(buf: bytes, pos: int, tc: int):
|
||||
return rd_f64le(buf, pos)
|
||||
if tc == P18['String']:
|
||||
return read_string18(buf, pos)
|
||||
if tc in (P18['Null'], P18['BooleanFalse'], P18['BooleanTrue'],
|
||||
P18['ShortZero'], P18['IntZero'], P18['LongZero'],
|
||||
P18['FloatZero'], P18['DoubleZero']):
|
||||
if tc == P18['Null']:
|
||||
return None, pos
|
||||
if tc == P18['BooleanFalse']:
|
||||
return False, pos
|
||||
if tc == P18['BooleanTrue']:
|
||||
return True, pos
|
||||
if tc in (P18['ShortZero'], P18['IntZero'], P18['LongZero']):
|
||||
return 0, pos
|
||||
if tc in (P18['FloatZero'], P18['DoubleZero']):
|
||||
return 0.0, pos
|
||||
if tc == P18['CompressedInt']:
|
||||
v, p = rd_varint(buf, pos)
|
||||
return zigzag(v), p
|
||||
|
||||
Reference in New Issue
Block a user