Replace hardcoded reads with TLObject's .read()

This commit is contained in:
Lonami Exo
2017-10-12 16:40:59 +02:00
parent 3a4662c3bf
commit 0c1170ee61
2 changed files with 29 additions and 25 deletions

View File

@@ -34,5 +34,5 @@ class GzipPacked(TLObject):
@staticmethod
def read(reader):
reader.read_int(signed=False) # code
assert reader.read_int(signed=False) == GzipPacked.CONSTRUCTOR_ID
return gzip.decompress(reader.tgread_bytes())