Class InflaterInputBuffer
An input buffer customised for use by InflaterInputStream
Inheritance
Inherited Members
Namespace: ICSharpCode.SharpZipLib.Zip.Compression.Streams
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class InflaterInputBuffer
Remarks
The buffer supports decryption of incoming data.
Constructors
| Improve this Doc View SourceInflaterInputBuffer(Stream)
Initialise a new instance of InflaterInputBuffer with a default buffer size
Declaration
public InflaterInputBuffer(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to buffer. |
InflaterInputBuffer(Stream, Int32)
Initialise a new instance of InflaterInputBuffer
Declaration
public InflaterInputBuffer(Stream stream, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to buffer. |
System.Int32 | bufferSize | The size to use for the buffer |
Remarks
A minimum buffer size of 1KB is permitted. Lower sizes are treated as 1KB.
Properties
| Improve this Doc View SourceAvailable
Get/set the number of bytes available
Declaration
public int Available { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ClearText
Get the contents of the clear text buffer.
Declaration
public byte[] ClearText { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
ClearTextLength
Get the number of useable bytes in ClearText
Declaration
public int ClearTextLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
CryptoTransform
Get/set the System.Security.Cryptography.ICryptoTransform to apply to any data.
Declaration
public ICryptoTransform CryptoTransform { set; }
Property Value
Type | Description |
---|---|
System.Security.Cryptography.ICryptoTransform |
Remarks
Set this value to null to have no transform applied.
RawData
Get the contents of the raw data buffer.
Declaration
public byte[] RawData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Remarks
This may contain encrypted data.
RawLength
Get the length of bytes in the RawData
Declaration
public int RawLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceFill()
Fill the buffer from the underlying input stream.
Declaration
public void Fill()
ReadClearTextBuffer(Byte[], Int32, Int32)
Read clear text data from the input stream.
Declaration
public int ReadClearTextBuffer(byte[] outBuffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | outBuffer | The buffer to add data to. |
System.Int32 | offset | The offset to start adding data at. |
System.Int32 | length | The number of bytes to read. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of bytes actually read. |
ReadLeByte()
Read a System.Byte from the input stream.
Declaration
public byte ReadLeByte()
Returns
Type | Description |
---|---|
System.Byte | Returns the byte read. |
ReadLeInt()
Read an System.Int32 in little endian byte order.
Declaration
public int ReadLeInt()
Returns
Type | Description |
---|---|
System.Int32 | The int value read. |
ReadLeLong()
Read a System.Int64 in little endian byte order.
Declaration
public long ReadLeLong()
Returns
Type | Description |
---|---|
System.Int64 | The long value read. |
ReadLeShort()
Read an System.Int16 in little endian byte order.
Declaration
public int ReadLeShort()
Returns
Type | Description |
---|---|
System.Int32 | The short value read case to an int. |
ReadRawBuffer(Byte[])
Read a buffer directly from the input stream
Declaration
public int ReadRawBuffer(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer to fill |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of bytes read. |
ReadRawBuffer(Byte[], Int32, Int32)
Read a buffer directly from the input stream
Declaration
public int ReadRawBuffer(byte[] outBuffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | outBuffer | The buffer to read into |
System.Int32 | offset | The offset to start reading data into. |
System.Int32 | length | The number of bytes to read. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of bytes read. |
SetInflaterInput(Inflater)
Call SetInput(Byte[], Int32, Int32) passing the current clear text buffer contents.
Declaration
public void SetInflaterInput(Inflater inflater)
Parameters
Type | Name | Description |
---|---|---|
Inflater | inflater | The inflater to set input for. |