A System.IO.Stream wrapper around the ComponentAce zlib implementation which works bidirectionally and eliminates a data copy.
More...
|
| ZlibIOStream (Stream underlying, int windowSize) |
| Initializes a new instance of the ZlibIOStream class with the specified underlying stream and window size. More...
|
|
override void | Flush () |
| Writes any data buffered in the internal buffer to the underlying device. More...
|
|
override int | Read (byte[] buffer, int offset, int count) |
| Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. More...
|
|
override long | Seek (long offset, SeekOrigin origin) |
| Sets the position within the current stream. More...
|
|
override void | SetLength (long value) |
| Sets the length of the current stream. More...
|
|
override void | Write (byte[] buffer, int offset, int count) |
| Writes a sequence of bytes to the current stream and advances the position within the stream by the number of bytes written. More...
|
|
|
override bool | CanRead [get] |
| Gets a value indicating whether the stream supports reading. More...
|
|
override bool | CanSeek [get] |
| Gets a value indicating whether the stream supports seeking. More...
|
|
override bool | CanWrite [get] |
| Gets a value indicating whether the stream supports writing. More...
|
|
override long | Length [get] |
| Gets the length of the stream. More...
|
|
override long | Position [get, set] |
| Gets or sets the position within the current stream. More...
|
|
A System.IO.Stream wrapper around the ComponentAce zlib implementation which works bidirectionally and eliminates a data copy.
◆ ZlibIOStream()
AMPS.Client.ZlibIOStream.ZlibIOStream |
( |
Stream |
underlying, |
|
|
int |
windowSize |
|
) |
| |
|
inline |
Initializes a new instance of the ZlibIOStream class with the specified underlying stream and window size.
- Parameters
-
underlying | The underlying stream. |
windowSize | The window size. |
◆ Flush()
override void AMPS.Client.ZlibIOStream.Flush |
( |
| ) |
|
|
inline |
Writes any data buffered in the internal buffer to the underlying device.
◆ Read()
override int AMPS.Client.ZlibIOStream.Read |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
count |
|
) |
| |
|
inline |
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
- Parameters
-
buffer | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. |
offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | The maximum number of bytes to be read from the current stream. |
- Returns
- The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream is reached before any bytes are read.
◆ Seek()
override long AMPS.Client.ZlibIOStream.Seek |
( |
long |
offset, |
|
|
SeekOrigin |
origin |
|
) |
| |
|
inline |
Sets the position within the current stream.
- Parameters
-
offset | The byte offset to seek. |
origin | The reference point from which to obtain the new position. |
- Returns
- The new position within the current stream.
◆ SetLength()
override void AMPS.Client.ZlibIOStream.SetLength |
( |
long |
value | ) |
|
|
inline |
Sets the length of the current stream.
- Parameters
-
value | The desired length of the current stream in bytes. |
◆ Write()
override void AMPS.Client.ZlibIOStream.Write |
( |
byte[] |
buffer, |
|
|
int |
offset, |
|
|
int |
count |
|
) |
| |
|
inline |
Writes a sequence of bytes to the current stream and advances the position within the stream by the number of bytes written.
- Parameters
-
buffer | The byte array containing the data to write. |
offset | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
count | The number of bytes to be written to the current stream. |
◆ CanRead
override bool AMPS.Client.ZlibIOStream.CanRead |
|
get |
Gets a value indicating whether the stream supports reading.
◆ CanSeek
override bool AMPS.Client.ZlibIOStream.CanSeek |
|
get |
Gets a value indicating whether the stream supports seeking.
◆ CanWrite
override bool AMPS.Client.ZlibIOStream.CanWrite |
|
get |
Gets a value indicating whether the stream supports writing.
◆ Length
override long AMPS.Client.ZlibIOStream.Length |
|
get |
Gets the length of the stream.
◆ Position
override long AMPS.Client.ZlibIOStream.Position |
|
getset |
Gets or sets the position within the current stream.
The documentation for this class was generated from the following file:
- AMPS.Client/ZlibIOStream.cs