/* * Copyright 1995, 2003 Perforce Software. All rights reserved. * * This file is part of Perforce - the FAST SCM System. */ /* * gzip.h - a Gzip class for producing gzip streams * * Classes Defined: * * Gzip - a compressor/uncompressor * * Public variables: * * buf[4096] - convenient buffer for input or output * Not used internally, but is/os can point there. * * is, ie - start and end of input buffer * os, oe - start and end of output buffer * * Public methods: * * Compress() - compress data in is->ie into os->oe. * Set is = 0 to flush. Returns 0 when * flushing complete. * * Uncompress() - expand data in is->ie into os->oe. * Returns 0 when uncompression complete. * * InputEmpty() - Available input consumed. * Always returns 0 when flushing. * * OutputFull() - Available output full. */ typedef struct z_stream_s z_stream; class Gzip { public: Gzip(); ~Gzip(); int Compress( Error *e ); int Uncompress( Error *e ); // input/output start/end const char *is, *ie; char *os, *oe; int InputEmpty() { return is && is == ie; } int OutputFull() { return os == oe; } private: z_stream *zstream; int isInflate; int isDeflate; int state; // temp buffer writing char *ws, *we; unsigned long crc; char tmpbuf[10]; // sizeof gz_magic // header handling int hflags; int hxlen; } ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 18760 | rlranft |
Populate -o //guest/perforce_software/p4/... //guest/rlranft/p4/.... |
||
//guest/perforce_software/p4/2015-1/zlib/gzip.h | |||||
#1 | 15903 | Matt Attaway | Everything should be happy now between the Workshop and the depot paths | ||
//guest/perforce_software/p4/2015_1/zlib/gzip.h | |||||
#1 | 15901 | Matt Attaway | Clean up code to fit modern Workshop naming standards | ||
//guest/perforce_software/p4/2015.1/zlib/gzip.h | |||||
#1 | 12190 | Matt Attaway | Initial drop of 2015.1 p4/p4api source |