mirror of
https://github.com/Textualize/textual-serve.git
synced 2025-10-17 02:50:37 +03:00
Update binary encoding
This commit is contained in:
@@ -93,7 +93,8 @@ def dump(data: object) -> bytes:
|
||||
Returns:
|
||||
The encoded bytes.
|
||||
"""
|
||||
return b"s%i:%s" % (len(datum), datum.encode("utf-8"))
|
||||
encoded_data = datum.encode("utf-8")
|
||||
return b"s%i:%s" % (len(encoded_data), encoded_data)
|
||||
|
||||
def encode_list(datum: list) -> bytes:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user