14 #include "p6iohandler.h"
22 static const P6GZSTREAMFLAGS P6GZSTREAM_NOFLAGS = 0x00000000;
23 static const P6GZSTREAMFLAGS P6GZSTREAM_COMPRESSMASK = 0x000f0000;
24 static const P6GZSTREAMFLAGS P6GZSTREAM_COMPRESS = 0x00000000;
25 static const P6GZSTREAMFLAGS P6GZSTREAM_DECOMPRESS = 0x00010000;
26 #define P6GZCOMPRESSTYPE(f) ((f) & P6GZSTREAM_COMPRESSMASK)
27 #define P6GZCOMPRESSING(f) (P6GZSTREAM_COMPRESS == P6GZCOMPRESSTYPE((f)) ? P6TRUE : P6FALSE)
28 #define P6GZDECOMPRESSING(f) (P6GZSTREAM_DECOMPRESS == P6GZCOMPRESSTYPE((f)) ? P6TRUE : P6FALSE)
31 static const P6GZSTREAMFLAGS P6GZSTREAM_WRAPPERMASK = 0x0000000f;
32 static const P6GZSTREAMFLAGS P6GZSTREAM_WRAPNONE = 0x00000000;
33 static const P6GZSTREAMFLAGS P6GZSTREAM_WRAPZLIB = 0x00000001;
37 static const P6GZSTREAMFLAGS P6GZSTREAM_WRAPGZIP = 0x00000002;
40 #define P6GZWRAPPERTYPE(f) ((f) & P6GZSTREAM_WRAPPERMASK)
41 #define P6GZ_WRAPISGZIP(f) (P6GZWRAPPERTYPE((f)) == P6GZSTREAM_WRAPGZIP ? P6TRUE : P6FALSE)
42 #define P6GZ_WRAPISZLIB(f) (P6GZWRAPPERTYPE((f)) == P6GZSTREAM_WRAPZLIB ? P6TRUE : P6FALSE)
43 #define P6GZ_WRAPISNONE(f) (P6GZWRAPPERTYPE((f)) == P6GZSTREAM_WRAPNONE ? P6TRUE : P6FALSE)
46 static const P6GZSTREAMFLAGS P6GZSTREAM_STRATEGYMASK = 0x000000f0;
47 static const P6GZSTREAMFLAGS P6GZSTREAM_STRATDEF = 0x00000000;
48 static const P6GZSTREAMFLAGS P6GZSTREAM_STRATFILTERED= 0x00000010;
49 static const P6GZSTREAMFLAGS P6GZSTREAM_STRATHUFFMAN = 0x00000020;
50 static const P6GZSTREAMFLAGS P6GZSTREAM_STRATRLE = 0x00000040;
51 static const P6GZSTREAMFLAGS P6GZSTREAM_STRATFIXED = 0x00000080;
52 #define P6GZSTRATEGYTYPE(f) ((f) & P6GZSTREAM_STRATEGYMASK)
55 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHMASK = 0x0000ff00;
56 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHDEFAULT = 0x00000000;
57 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHNONE = 0x00000100;
58 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHPARTIAL = 0x00000200;
59 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHSYNC = 0x00000400;
60 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHFULL = 0x00000800;
61 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHFINISH = 0x00001000;
62 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHBLOCK = 0x00002000;
63 static const P6GZSTREAMFLAGS P6GZSTREAM_FLUSHTREES = 0x00004000;
64 #define P6GZFLUSHTYPE(f) ((f) & P6GZSTREAM_FLUSHMASK)
67 static const P6GZCOMPRESSLEVEL P6GZCL_MIN
P6PURE;
68 static const P6GZCOMPRESSLEVEL P6GZCL_MAX = 9;
69 static const P6GZCOMPRESSLEVEL P6GZCL_DEFAULT = 6;
84 #define INTERFACE p6IZlibSSH
145 #define IF_p6IZlibSSH {0x2AD59EEB,0xF169,0x4472,{0xB2,0x35,0x96,0x82,0x44,0xAD,0xE9,0x14}}
148 #define COMP_p6ZlibSSH {0xC20335D0,0x7C72,0x467F,{0xBD,0xE9,0xC0,0x82,0x5F,0x07,0xFD,0x47}}
153 static const P6GZIOFLAGS P6GZIOF_NOFLAGS = 0x00000000;
154 static const P6GZIOFLAGS P6GZIOF_NOHEADER = 0x00000001;
164 #define INTERFACE p6IGzipInflateToStream
202 #define IF_p6IGzipInflateToStream {0xD23B9240,0x4923,0x34C9,{0xB3,0xFE,0xC4,0xB1,0x82,0x63,0xFC,0xE5}}
205 #define COMP_p6GzipInflateToStream {0x187AA4D2,0x475C,0x3167,{0x32,0xAD,0xA4,0x83,0x61,0xB3,0xF8,0x18}}
215 #define INTERFACE p6IGzipDeflateToStream
253 #define IF_p6IGzipDeflateToStream {0xE0408340,0x4DE1,0x3292,{0x61,0x1B,0x1C,0xB2,0xF3,0x0D,0xB5,0x92}}
256 #define COMP_p6GzipDeflateToStream {0x19B5F73C,0x100A,0x4514,{0x8E,0x66,0x26,0x6A,0xAC,0x9C,0xBF,0xA0}}
267 #define INTERFACE p6IGzipInflateFromHandler
307 #define IF_p6IGzipInflateFromHandler {0x566626EB,0x44F9,0xA909,{0x6C,0x18,0xCA,0xB5,0x36,0x29,0x3E,0xC1}}
310 #define COMP_p6GzipInflateFromHandler {0x0BD83415,0x4965,0x1E5F,{0xD6,0x5E,0xDF,0x84,0x16,0xEA,0xC2,0x98}}
321 #define INTERFACE p6IGzipDeflateToHandler
357 #define IF_p6IGzipDeflateToHandler {0xD8F57EA1,0xFC0D,0x4EF3,{0x99,0xC8,0xB0,0x76,0x28,0x9F,0x90,0x7E}}
360 #define COMP_p6GzipDeflateToHandler {0x33A7D609,0x14AB,0x4522,{0xB9,0x7E,0x43,0x54,0x19,0xC8,0xE9,0xDC}}
372 #define INTERFACE p6IGzipInflateBuffer
414 #define IF_p6IGzipInflateBuffer {0xF94DA9AB,0xCBD6,0x4E05,{0x84,0x7E,0x37,0xD8,0xE7,0x8A,0x85,0x08}}
417 #define COMP_p6GzipInflateBuffer {0xC125EDDE,0xF846,0x47D7,{0x8E,0x62,0x70,0x9F,0x54,0xB0,0x20,0x5D}}
429 #define INTERFACE p6IGzipDeflateBuffer
478 #define IF_p6IGzipDeflateBuffer {0x6A947420,0x833E,0x4EF5,{0x9D,0x7B,0x3E,0x80,0xF0,0xF3,0xC6,0x31}}
481 #define COMP_p6GzipDeflateBuffer {0x94A8B513,0x5AD4,0x4917,{0xA8,0xE5,0x06,0xCC,0x6A,0x32,0xBC,0x4D}}
P6INT32 P6GZCOMPRESSLEVEL
unsigned char P6BOOL
Boolean type.
Inflates the data provided in the specified buffer.
p6IDataStream interface definitions
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.
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.
#define P6DECLCOMMETHOD(method)
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...
Inflates the data provided to calling the process() method and writes it to the p6IDataStream provide...
#define P6DECLAREIF_(iface, baseif)