Intent: Allow an extra "compression" method to allow creation of manifests - a zipfile containing file information only, and no file data. Implemented as a compression method of 255, selected with -255 on the command line. Requires: -# command line option to accept -255 zipup() to not output any data when the "compression" method is set to MANIFEST. Modifications listed are to InfoZip sources for zip version 2.3 dated 29 November 1999 in the CHANGES file. =========================================================================== In file zip.h: Change: ----8<---- #define BEST -1 /* Use best method (deflation or store) */ #define STORE 0 /* Store method */ #define DEFLATE 8 /* Deflation method */ ----8<---- to: ----8<---- #define BEST -1 /* Use best method (deflation or store) */ #define STORE 0 /* Store method */ #define DEFLATE 8 /* Deflation method */ #define MANIFEST 255 /* Manifest of file info only */ ----8<---- =========================================================================== In file zip.c: In function main(): Change: ----8<---- case '0': method = STORE; level = 0; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* Set the compression efficacy */ level = *p - '0'; break; ----8<---- to: ----8<---- case '0': method = STORE; level = 0; break; case '2': if (*(p+1) === '5') /* look for -255 */ { method = MANIFEST; level = 255; break; } else { level = *p - '0'; break; } case '1': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* Set the compression efficacy */ level = *p - '0'; break; ----8<---- =========================================================================== In file zipup.c: In function zipup(): Change: ----8<---- if (m == DEFLATE) { if (set_type) z->att = (ush)UNKNOWN; /*is finally set in filecompress()*/ s = filecompress(z, y, &m); #ifndef PGP if (z->att == (ush)BINARY && translate_eol) { zipwarn("-l used on binary file", ""); } #endif } else if (!isdir) { if ((b = malloc(SBSZ)) == NULL) return ZE_MEM; if (l) { k = rdsymlnk(z->name, b, SBSZ); ----8<---- to: ----8<---- if (m == DEFLATE) { if (set_type) z->att = (ush)UNKNOWN; /*is finally set in filecompress()*/ s = filecompress(z, y, &m); #ifndef PGP if (z->att == (ush)BINARY && translate_eol) { zipwarn("-l used on binary file", ""); } #endif } else if (!isdir && m != MANIFEST) { if ((b = malloc(SBSZ)) == NULL) return ZE_MEM; if (l) { k = rdsymlnk(z->name, b, SBSZ); ----8<---- ===========================================================================