From bf318ae66dd2017ed206df381ad5072212f948c5 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 26 Jul 2018 00:51:37 +0200 Subject: [PATCH] Fix reading gzipped data --- .../main/java/io/github/lonamiwebs/overgram/tl/GzipPacked.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;