Commit abcd62fd authored by Sven Robertz's avatar Sven Robertz
Browse files

changed encoding in python

parent 986a3cbe
......@@ -588,7 +588,8 @@ class Encoder(Codec):
self.encode_byte(tmp & 0x7f)
def encode_type(self, index):
self.pack("!i", index)
self.encode_packed32(index)
# self.pack("!i", index)
def encode_boolean(self, v):
if v:
......@@ -616,7 +617,9 @@ class Encoder(Codec):
def encode_string(self, v):
s = v.encode("utf8")
self.pack("!i%ds" % len(s), len(s), s)
self.encode_packed32(len(s));
self.pack("%ds" % len(s),s)
# self.pack("!i%ds" % len(s), len(s), s)
class Decoder(Codec):
def __init__(self, reader):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment