Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Missing read/compressed and write/uncompressed methods in DeflateStream class

$
0
0

The System.IO.Compression.DeflateStream class provides a read() method to read compressed data from an input stream and return decompressed bytes, and awrite() method to compress data bytes and write them to an output stream. But it does not provide the opposite methods, i.e., aread() method to read data bytes from an input stream and return compressed data, and awrite() method that takes compressed data and decompresses it and writes the decompressed data bytes to an output stream.

These missing methods would be useful for chaining together multiple stream filters, where each one performs a different transformation or filtering operation. For example, multiple stream filters might be used when processing data sent to, or received from, a network socket, where each filter processes the stream for a specific stage in the chain, such as compression/decompression.


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>