private static TLObject ParseGZipPacked(BinaryReader reader) { try { using (var ms = new MemoryStream()) using (var packedStream = new MemoryStream(BytesUtil.Read(reader), false)) using (var zipStream = new System.IO.Compression.GZipStream(packedStream, System.IO.Compression.CompressionMode.Decompress)) using (var compressedReader = new BinaryReader(ms)) { zipStream.CopyTo(ms); ms.Position = 0; return(TLObject.Deserialize(compressedReader)); } } catch { return(null); } }