//////////////// /// <summary> /// Pulls a byte array from a compressed stream. /// </summary> /// <param name="srcStream"></param> /// <returns></returns> public static byte[] FromStreamToBytes(Stream srcStream) { using (var zipStream = new GZipStream(srcStream, CompressionMode.Decompress)) { var streamReader = new BigEndianReader(zipStream); return(streamReader.ReadAllBytes()); } }