14 #include "p6iohandler.h"
23 #define P6GZCOMPRESSTYPE(f) ((f) & P6GZSTREAM_COMPRESSMASK)
24 #define P6GZCOMPRESSING(f) (P6GZSTREAM_COMPRESS == P6GZCOMPRESSTYPE((f)) ? P6TRUE : P6FALSE)
25 #define P6GZDECOMPRESSING(f) (P6GZSTREAM_DECOMPRESS == P6GZCOMPRESSTYPE((f)) ? P6TRUE : P6FALSE)
37 #define P6GZWRAPPERTYPE(f) ((f) & P6GZSTREAM_WRAPPERMASK)
38 #define P6GZ_WRAPISGZIP(f) (P6GZWRAPPERTYPE((f)) == P6GZSTREAM_WRAPGZIP ? P6TRUE : P6FALSE)
39 #define P6GZ_WRAPISZLIB(f) (P6GZWRAPPERTYPE((f)) == P6GZSTREAM_WRAPZLIB ? P6TRUE : P6FALSE)
40 #define P6GZ_WRAPISNONE(f) (P6GZWRAPPERTYPE((f)) == P6GZSTREAM_WRAPNONE ? P6TRUE : P6FALSE)
49 #define P6GZSTRATEGYTYPE(f) ((f) & P6GZSTREAM_STRATEGYMASK)
61 #define P6GZFLUSHTYPE(f) ((f) & P6GZSTREAM_FLUSHMASK)
140 #define IF_p6IZlibSSH {0x2AD59EEB,0xF169,0x4472,{0xB2,0x35,0x96,0x82,0x44,0xAD,0xE9,0x14}}
143 #define COMP_p6ZlibSSH {0xC20335D0,0x7C72,0x467F,{0xBD,0xE9,0xC0,0x82,0x5F,0x07,0xFD,0x47}}
148 static const P6GZIOFLAGS P6GZIOF_NOFLAGS = 0x00000000;
149 static const P6GZIOFLAGS P6GZIOF_NOHEADER = 0x00000001;
194 #define IF_p6IGzipInflateToStream {0xD23B9240,0x4923,0x34C9,{0xB3,0xFE,0xC4,0xB1,0x82,0x63,0xFC,0xE5}}
197 #define COMP_p6GzipInflateToStream {0x187AA4D2,0x475C,0x3167,{0x32,0xAD,0xA4,0x83,0x61,0xB3,0xF8,0x18}}
242 #define IF_p6IGzipDeflateToStream {0xE0408340,0x4DE1,0x3292,{0x61,0x1B,0x1C,0xB2,0xF3,0x0D,0xB5,0x92}}
245 #define COMP_p6GzipDeflateToStream {0x19B5F73C,0x100A,0x4514,{0x8E,0x66,0x26,0x6A,0xAC,0x9C,0xBF,0xA0}}
293 #define IF_p6IGzipInflateFromHandler {0x566626EB,0x44F9,0xA909,{0x6C,0x18,0xCA,0xB5,0x36,0x29,0x3E,0xC1}}
296 #define COMP_p6GzipInflateFromHandler {0x0BD83415,0x4965,0x1E5F,{0xD6,0x5E,0xDF,0x84,0x16,0xEA,0xC2,0x98}}
340 #define IF_p6IGzipDeflateToHandler {0xD8F57EA1,0xFC0D,0x4EF3,{0x99,0xC8,0xB0,0x76,0x28,0x9F,0x90,0x7E}}
343 #define COMP_p6GzipDeflateToHandler {0x33A7D609,0x14AB,0x4522,{0xB9,0x7E,0x43,0x54,0x19,0xC8,0xE9,0xDC}}
394 #define IF_p6IGzipInflateBuffer {0xF94DA9AB,0xCBD6,0x4E05,{0x84,0x7E,0x37,0xD8,0xE7,0x8A,0x85,0x08}}
397 #define COMP_p6GzipInflateBuffer {0xC125EDDE,0xF846,0x47D7,{0x8E,0x62,0x70,0x9F,0x54,0xB0,0x20,0x5D}}
455 #define IF_p6IGzipDeflateBuffer {0x6A947420,0x833E,0x4EF5,{0x9D,0x7B,0x3E,0x80,0xF0,0xF3,0xC6,0x31}}
458 #define COMP_p6GzipDeflateBuffer {0x94A8B513,0x5AD4,0x4917,{0xA8,0xE5,0x06,0xCC,0x6A,0x32,0xBC,0x4D}}
virtual P6R::P6ERR initialize(P6R::p6IDataStream *pOutStream, P6R::P6GZIOFLAGS fFlags)=0
Initializes the component for use.
virtual P6R::P6ERR initialize(P6GZSTREAMFLAGS fFlags, P6UINT32 nLevel)=0
Initialized the component for use and must be called successfully before calling any other method...
virtual P6R::P6ERR process(const P6R::P6VOID *pInputData, P6R::P6SIZE cbInputData, P6R::P6VOID *pOutputData, P6R::P6SIZE cbOutputData, P6R::P6SIZE *pcbOutput, P6R::P6BOOL bLast)=0
This method will process the provided data according to the flags that were specified in the call to ...
P6INT32 P6GZCOMPRESSLEVEL
virtual P6R::P6ERR process(P6R::P6VOID *pSource, P6R::P6SIZE cbSource)=0
This method will inflate the data provided in pBuffer and write it out using the preset p6IDataStream...
virtual P6R::P6ERR deflate(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer, P6R::P6SIZE *pcbDeflated)=0
The deflate() method must be called repeatedly until eCompleted is returned indicating all the data i...
Inflates the data provided in the specified buffer.
virtual P6R::P6ERR initialize(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer, P6R::P6GZIOFLAGS fFlags)=0
Initializes the component for use.
virtual P6R::P6ERR initialize(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer, P6R::P6INT nLevel, P6R::P6GZIOFLAGS fFlags)=0
Initializes the component for use.
virtual P6R::P6ERR end()=0
This method is used to tell the component that there is no more data to deflate so that it can finali...
p6IDataStream interface definitions
virtual P6R::P6ERR write(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer)=0
Deflates the data spcified in pBuffer and writes it to the preset p6IIoWriteHandler.
This interface is implmented by components that support receiving streamed data.
The base interface all [p6]COM components must derive from and implement.
Deflates the data provided in the specified buffer.
virtual P6R::P6ERR process(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer)=0
This method will deflate the data provided in pBuffer and write it out using the preset p6IDataStream...
virtual P6R::P6ERR end()=0
This method is used to tell the component that there is no more data to inflate so that it can finali...
virtual P6R::P6ERR initialize(P6R::p6IIoReadHandler *pIo, P6R::P6GZIOFLAGS fFlags)=0
Initializes the component for use.
Given an p6IIoReadHandler, this interface reads data from the handler using its read method...
This interface inplements compression/decompression that is specific to the SSH protocol.
Given an p6IIoWriteHandler, this interace deflates the data provided via the write method...
Deflates the data provided when calling the process() method and writes it to the p6IDataStream provi...
virtual P6R::P6ERR initialize(P6R::p6IDataStream *pOutStream, P6R::P6GZIOFLAGS fFlags)=0
Initializes the component for use.
virtual P6R::P6ERR read(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer, P6R::P6SIZE *pcbRead)=0
Attemps to read data from the source p6IIoReadHandler and inflate it into the provided buffer...
virtual P6R::P6ERR initialize(P6R::p6IIoWriteHandler *pIo, P6R::P6GZIOFLAGS fFlags)=0
Initializes the component for use.
virtual P6R::P6ERR close()=0
Terminates the compression stream, freeing any allocated data.
Inflates the data provided to calling the process() method and writes it to the p6IDataStream provide...
virtual P6R::P6ERR inflate(P6R::P6VOID *pBuffer, P6R::P6SIZE cbBuffer, P6R::P6SIZE *pcbInflated)=0
The inflate() method is called repeatedly until eCompleted is returned indicating that all the data i...
virtual P6R::P6ERR end()=0
This method is used to tell the component that there is no more data to inflate so that it can finali...
virtual P6R::P6ERR end()=0
This method is used to tell the component that there is no more data to deflate so that it can finali...