00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 #ifndef __ZIP_H__
00029 #define __ZIP_H__
00030
00031 #include "../common/platform.h"
00032
00033
00034 #define CM_NO_COMPRESSION 0
00035 #define CM_SHRUNK 1
00036 #define CM_REDUCED_F1 2
00037 #define CM_REDUCED_F2 3
00038 #define CM_REDUCED_F3 4
00039 #define CM_REDUCED_F4 5
00040 #define CM_IMPLODED 6
00041 #define CM_RESERVED_7 7
00042 #define CM_DEFLATED 8
00043 #define CM_DEFLATE64 9
00044 #define CM_IMPLODING 10
00045 #define CM_RESERVED_11 11
00046 #define CM_BZIP2 12
00047
00048
00049
00050 #define VMB_MSDOS_FAT 0
00051 #define VMB_AMIGA 1
00052 #define VMB_OPENVMS 2
00053 #define VMB_UNIX 3
00054 #define VMB_VM_CMS 4
00055 #define VMB_ATARI_ST 5
00056 #define VMB_OS_2_HPFS 6
00057 #define VMB_MACINTOSH 7
00058 #define VMB_Z_SYSTEM 8
00059 #define VMB_CP_M 9
00060 #define VMB_WINDOWS_NTFS 10
00061 #define VMB_MVS_OS_390_Z_OS 11
00062 #define VMB_VSE 12
00063 #define VMB_ACORN_RISC 13
00064 #define VMB_VFAT 14
00065 #define VMB_ALTERNATE_MVS 15
00066 #define VMB_BEOS 16
00067 #define VMB_TANDEM 17
00068 #define VMB_OS_400 18
00069 #define VMB_OS_X_DARWIN 19
00070
00071
00072
00073
00074 typedef struct zipHead_s
00075 {
00076 W16 versionmadeby;
00077 W16 versionneeded;
00078 W16 flag;
00079 W16 compression_method;
00080 W32 timedate;
00081 W32 crc32;
00082 W32 compressed_size;
00083 W32 uncompressed_size;
00084 W16 filename_length;
00085 W16 extrafield_length;
00086 W16 centralextra_length;
00087 W16 comment_length;
00088 W16 disknumstart;
00089 W16 internalattribute;
00090 W16 localflag;
00091 W32 externalattribute;
00092 W32 offset;
00093 wtBoolean deletefile;
00094 char filename[ 256 ];
00095 char extrafield[ 256 ];
00096 char centralextra[ 256 ];
00097 char comment[ 256 ];
00098
00099 } zipHead_t;
00100
00101
00102 wtBoolean zip_WriteLocalChunk( zipHead_t *z, FILE *f );
00103 wtBoolean zip_WriteCentralChunk( zipHead_t *z, FILE *f );
00104 wtBoolean zip_WriteEndChunk( W16 num, W32 size, W32 offset, W16 len, char *comment, FILE *f );
00105
00106
00107
00108 #endif
00109