/// <summary> /// Decompresses gzip stream to data stream /// </summary> /// <param name="dataStr"></param> /// <returns></returns> private Stream DecompressToStream(Stream dataStr) { using (var gzipStream = new System.IO.Compression.GZipStream(dataStr, CompressionMode.Decompress)) { return(gzipStream.CopyStream()); } //Ionic.Zlib example. ionic seems to not be available for net core though and restores for net 462 //using (var gzipStream = new Ionic.Zlib.GZipStream(dataStr, Ionic.Zlib.CompressionMode.Decompress)) //{ // return gzipStream.CopyStream(); //} }