00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #if !defined(GZIPOUTSTREAM_OL_GUARD)
00044 #define GZIPOUTSTREAM_OL_GUARD
00045
00046 #include <ObjectiveLib/ZlibOutStream.h>
00047
00048 @class OLDataOutStream;
00049
00062 @interface OLGzipOutStream : OLZlibOutStream
00063 {
00064 @protected
00068 uint32_t crc;
00069
00073 uint8_t* commentData;
00074
00078 uint8_t* fileNameData;
00079
00083 uint32_t modTime;
00084
00088 OLDataOutStream* extraFields;
00089
00093 BOOL headerWritten;
00094
00098 BOOL trailerWritten;
00099 }
00100
00101 + (id) streamWithOutStream: (OLOutStream*)underStream;
00102 + (id) streamWithOutStream: (OLOutStream*)underStream compressionLevel: (int)level;
00103
00107
00133 - (id) initWithOutStream: (OLOutStream*)underStream compressionLevel: (int)level bufferSize: (unsigned)size writeZlibHeader: (BOOL)zlibHeader;
00134
00135 #if !defined(OL_NO_OPENSTEP)
00136 - (void) dealloc;
00137 #endif
00138
00139
00154 - (void) addExtraField: (const char*)identifier withBytes: (const uint8_t*)buf count: (unsigned)num;
00155 - (void) close;
00156
00157 #if defined(OL_NO_OPENSTEP)
00158 - (void) freeStreamResources;
00159 #endif
00160
00169 - (void) markModificationTime;
00170
00182 - (void) setComment: (const char*)comment;
00183
00192 - (void) setCommentText: (OLText*)comment;
00193
00212 - (void) setOriginalFileName: (const char*)name includeModificationTime: (BOOL)mtime;
00213
00229 - (void) setOriginalFileNameText: (OLText*)name includeModificationTime: (BOOL)mtime;
00230 - (unsigned) writeBytes: (const uint8_t*)bytes count: (unsigned)num;
00231
00232 @end
00233
00234 #endif