9 using System.Runtime.InteropServices;
90 public void Add(
byte[] data)
92 Add(data,0,data.Length);
118 #region Destructor & IDisposable stuff
160 #region Helper methods
Implements the common functionality needed for all Codecs
CodecBase()
Initializes a new instance of the CodeBase class.
ZStream _ztream
Instance of the internal zlib buffer structure that is passed to all functions in the zlib dll
void OnDataAvailable()
Fires the DataAvailable event
void setChecksum(uint newSum)
Updates the running checksum property
const int kBufferSize
The size of the internal buffers
void resetOutput()
Resets the internal output buffers to a known state - ready for processing
void copyInput(byte[] data, int startIndex, int count)
Copies a number of bytes to the internal codec buffer - ready for proccesing
void Add(byte[] data)
Adds more data to the codec to be processed.
DataAvailableHandler DataAvailable
Occurs when more processed data are available.
bool _isDisposed
True if the object instance has been disposed, false otherwise
abstract void CleanUp()
Performs any codec specific cleanup
uint Checksum
Gets the checksum of the data that has been added so far
abstract void Add(byte[] data, int offset, int count)
Adds more data to the codec to be processed.
void Dispose()
Releases any unmanaged resources and calls the CleanUp() method of the derived class
abstract void Finish()
Finishes up any pending data that needs to be processed and handled.
void CleanUp(bool isDisposing)
~CodecBase()
Destroys this instance
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
Declares methods and events for implementing compressors/decompressors
delegate void DataAvailableHandler(byte[] data, int startIndex, int count)
Represents the method that will be called from a codec when new data are available.