Crisis.Ionic.Zlib.ZlibStream.Read C# (CSharp) Method

Read() public method

Read data from the stream.

If you wish to use the ZlibStream to compress data while reading, you can create a ZlibStream with CompressionMode.Compress, providing an uncompressed data stream. Then call Read() on that ZlibStream, and the data read will be compressed. If you wish to use the ZlibStream to decompress data while reading, you can create a ZlibStream with CompressionMode.Decompress, providing a readable compressed data stream. Then call Read() on that ZlibStream, and the data will be decompressed as it is read.

A ZlibStream can be used for Read() or Write(), but not both.

public Read ( byte buffer, int offset, int count ) : int
buffer byte /// The buffer into which the read data should be placed.
offset int /// the offset within that data array to put the first byte read.
count int the number of bytes to read.
return int
        public override int Read(byte[] buffer, int offset, int count)
        {
                if (_disposed) throw new ObjectDisposedException("ZlibStream");
            return _baseStream.Read(buffer, offset, count);
        }