public void TestExtractStream() { using (var stream = OrginolStream()) { using (var compressStream = GetCompressStream()) { var extractStream = CompressManager.ExtractStream(compressStream); Assert.IsNotNull(extractStream); Assert.AreEqual(stream.Length, extractStream.Length); } } }
private void PrepareUploadedFile() { if (this.uploader.PostedFile != null) { Stream decompressedStream = CompressManager.ExtractStream(this.uploader.PostedFile.InputStream); decompressedStream.Seek(0, SeekOrigin.Begin); byte[] data = decompressedStream.ToBytes(); if (data.Length > 0) { this.processDespText.Text = Encoding.GetEncoding(encodingSelector.SelectedValue).GetString(data); } } }