Fix reading gzipped data

master
Lonami Exo 2018-07-26 00:51:37 +02:00
parent bc0414a436
commit bf318ae66d
1 changed files with 1 additions and 1 deletions

View File

@ -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;