diff --git a/lib/src/main/java/io/github/lonamiwebs/overgram/tl/GzipPacked.java b/lib/src/main/java/io/github/lonamiwebs/overgram/tl/GzipPacked.java index b8fba3c..b94b68a 100644 --- a/lib/src/main/java/io/github/lonamiwebs/overgram/tl/GzipPacked.java +++ b/lib/src/main/java/io/github/lonamiwebs/overgram/tl/GzipPacked.java @@ -30,7 +30,7 @@ public class GzipPacked extends TLObject { @Override public void deserialize(final BinaryReader reader) throws ClassNotFoundException { try { - final GZIPInputStream gzip = new GZIPInputStream(new ByteArrayInputStream(reader.read())); + final GZIPInputStream gzip = new GZIPInputStream(new ByteArrayInputStream(reader.readBytes())); final ByteArrayOutputStream out = new ByteArrayOutputStream(4096); final byte[] buffer = new byte[4096]; int read;