Inherits DotZLib::Codec.
Inherited by DotZLib::Deflater, and DotZLib::Inflater.
Inheritance diagram for DotZLib::CodecBase:


Public Member Functions | |
| CodecBase () | |
Initializes a new instance of the CodeBase class. | |
| void | Add (byte[] data) |
| Adds more data to the codec to be processed. | |
| abstract void | Add (byte[] data, int offset, int count) |
| Adds more data to the codec to be processed. | |
| abstract void | Finish () |
| Finishes up any pending data that needs to be processed and handled. | |
| void | Dispose () |
| Releases any unmanaged resources and calls the CleanUp() method of the derived class. | |
Data Fields | |
| event DataAvailableHandler | DataAvailable |
| Occurs when more processed data are available. | |
Protected Member Functions | |
| void | OnDataAvailable () |
| Fires the DataAvailable event. | |
| abstract void | CleanUp () |
| Performs any codec specific cleanup. | |
| void | copyInput (byte[] data, int startIndex, int count) |
| Copies a number of bytes to the internal codec buffer - ready for proccesing. | |
| void | resetOutput () |
| Resets the internal output buffers to a known state - ready for processing. | |
| void | setChecksum (uint newSum) |
| Updates the running checksum property. | |
Protected Attributes | |
| bool | _isDisposed = false |
| True if the object instance has been disposed, false otherwise. | |
| const int | kBufferSize = 16384 |
| The size of the internal buffers. | |
Properties | |
| uint | Checksum |
| Gets the checksum of the data that has been added so far. | |
Private Member Functions | |
| ~CodecBase () | |
| Destroys this instance. | |
| void | CleanUp (bool isDisposing) |
Private Attributes | |
| internal ZStream | _ztream = new ZStream() |
| Instance of the internal zlib buffer structure that is passed to all functions in the zlib dll. | |
| byte[] | _outBuffer = new byte[kBufferSize] |
| byte[] | _inBuffer = new byte[kBufferSize] |
| GCHandle | _hInput |
| GCHandle | _hOutput |
| uint | _checksum = 0 |
Definition at line 16 of file CodecBase.cs.
|
|
Initializes a new instance of the
Definition at line 50 of file CodecBase.cs. References _hInput, _hOutput, _inBuffer, _outBuffer, and CleanUp(). |
|
|
Destroys this instance.
Definition at line 123 of file CodecBase.cs. References CleanUp(). |
|
||||||||||||||||
|
Adds more data to the codec to be processed.
DataAvailable event This must be implemented by a derived class
Implements DotZLib::Codec. Implemented in DotZLib::Deflater, and DotZLib::Inflater. |
|
|
Adds more data to the codec to be processed.
DataAvailable event
Implements DotZLib::Codec. Definition at line 90 of file CodecBase.cs. |
|
|
Definition at line 143 of file CodecBase.cs. References _hInput, _hOutput, _isDisposed, and CleanUp(). |
|
|
Performs any codec specific cleanup. This must be implemented by a derived class Implemented in DotZLib::Deflater, and DotZLib::Inflater. Referenced by CleanUp(), CodecBase(), Dispose(), and ~CodecBase(). |
|
||||||||||||||||
|
Copies a number of bytes to the internal codec buffer - ready for proccesing.
Definition at line 168 of file CodecBase.cs. References _hInput, _inBuffer, _ztream, Array(), DotZLib::ZStream::avail_in, DotZLib::ZStream::next_in, and DotZLib::ZStream::total_in. Referenced by DotZLib::Inflater::Add(), and DotZLib::Deflater::Add(). |
|
|
Releases any unmanaged resources and calls the CleanUp() method of the derived class.
Definition at line 131 of file CodecBase.cs. References CleanUp(). |
|
|
Finishes up any pending data that needs to be processed and handled. This must be implemented by a derived class Implements DotZLib::Codec. Implemented in DotZLib::Deflater, and DotZLib::Inflater. |
|
|
Fires the DataAvailable event.
Definition at line 75 of file CodecBase.cs. References _outBuffer, _ztream, DataAvailable, null, resetOutput(), and DotZLib::ZStream::total_out. Referenced by DotZLib::Inflater::Add(), DotZLib::Deflater::Add(), DotZLib::Inflater::Finish(), and DotZLib::Deflater::Finish(). |
|
|
Resets the internal output buffers to a known state - ready for processing.
Definition at line 180 of file CodecBase.cs. References _hOutput, _ztream, DotZLib::ZStream::avail_out, kBufferSize, DotZLib::ZStream::next_out, and DotZLib::ZStream::total_out. Referenced by DotZLib::Deflater::Deflater(), DotZLib::Inflater::Finish(), DotZLib::Deflater::Finish(), DotZLib::Inflater::Inflater(), and OnDataAvailable(). |
|
|
Updates the running checksum property.
Definition at line 191 of file CodecBase.cs. References _checksum. Referenced by DotZLib::Inflater::Add(), DotZLib::Deflater::Add(), DotZLib::Inflater::Finish(), and DotZLib::Deflater::Finish(). |
|
|
Definition at line 43 of file CodecBase.cs. Referenced by setChecksum(). |
|
|
Definition at line 40 of file CodecBase.cs. Referenced by CleanUp(), CodecBase(), and copyInput(). |
|
|
Definition at line 41 of file CodecBase.cs. Referenced by CleanUp(), CodecBase(), and resetOutput(). |
|
|
Definition at line 38 of file CodecBase.cs. Referenced by CodecBase(), and copyInput(). |
|
|
True if the object instance has been disposed, false otherwise.
Definition at line 30 of file CodecBase.cs. Referenced by CleanUp(). |
|
|
Definition at line 37 of file CodecBase.cs. Referenced by CodecBase(), and OnDataAvailable(). |
|
|
Instance of the internal zlib buffer structure that is passed to all functions in the zlib dll.
Definition at line 25 of file CodecBase.cs. Referenced by DotZLib::Inflater::Add(), DotZLib::Deflater::Add(), DotZLib::Inflater::CleanUp(), DotZLib::Deflater::CleanUp(), copyInput(), DotZLib::Deflater::Deflater(), DotZLib::Inflater::Finish(), DotZLib::Deflater::Finish(), DotZLib::Inflater::Inflater(), OnDataAvailable(), and resetOutput(). |
|
|
Occurs when more processed data are available.
Implements DotZLib::Codec. Definition at line 70 of file CodecBase.cs. Referenced by OnDataAvailable(). |
|
|
The size of the internal buffers.
Definition at line 35 of file CodecBase.cs. Referenced by DotZLib::Inflater::Add(), DotZLib::Deflater::Add(), and resetOutput(). |
|
|
Gets the checksum of the data that has been added so far.
Implements DotZLib::Codec. Definition at line 114 of file CodecBase.cs. |
1.4.6