home *** CD-ROM | disk | FTP | other *** search
- SmartZIP (tm) ZIP File Optimizer ■ Version 1.10 ■ August, 1990
- Copyright 1989, 1990 ■ Joseph A. Vincent Consulting ■ All Rights Reserved
-
-
- If you're reading this before using SmartZIP 1.10, congratulations! Not
- many people are as disciplined and thorough as you are. However, please
- be aware that the file, "READ_ME!.NOW", is MANDATORY READING, since
- there are some caveats there that aren't provided here. Please review
- "READ_ME!.NOW" before using SmartZIP 1.10.
-
- -----------------------
- >>>>> What is SmartZIP?
- -----------------------
-
- SmartZIP is a ZIP file-size optimizing companion product for PKZIP 1.xx
- and PKZIP 0.9x, so don't throw away PKZIP 0.9x yet! SmartZIP can also
- take advantage of PKZIP 0.9x if that version's "Reducing" will yield
- better compression for a particular file. In fact, MUCH of the benefit
- of using SmartZIP comes from exploiting PKZIP 0.9x's Reducing algorithm.
- SmartZIP, working with PKZIP 1.xx and PKZIP 0.9x, will produce the
- absolutely, positively smallest ZIP files possible.
-
- SmartZIP is an intelligent ZIP file create/update/reZIP utility that
- will minimize both ZIP file size and the time required to create/update
- /reZIP an optimized ZIP file. It does this by using logic that will
- always yield the smallest possible ZIP file in a minimum number of
- trials.
-
- SmartZIP is shareware. That means that you are encouraged to try it to
- see if it meets your needs and, if you decide to keep and use the
- program, register it and pay a reasonable fee ($12 per copy suggested).
- Those who register SmartZIP will receive:
-
- - "MergZIPs", a program that will merge two existing ZIPs together
- without requiring any intermediate unZIPping of either or both of
- the two ZIPs. This program is not available as shareware. It's
- only available as a premium for registering SmartZIP.
-
- - The next release of SmartZIP as soon as it is released.
-
- Many hours of hard work have gone into producing SmartZIP and the
- accompanying documentation. I developed SmartZIP because I needed it
- and I use it every day. I think you'll find that SmartZIP produces an
- appreciable savings in disk space beyond that saved by using PKZIP alone
- at the expense of a nominal amount of extra time spent in doing data
- compression.
-
- -------------------
- >>>>> Why SmartZIP?
- -------------------
-
- I wrote SmartZIP based on my observation that no single compression
- algorithm ALWAYS yields the best compression. While one file might
- compress best with Imploding, another might compress best with Shrinking
- or Reducing. Therefore, it's not possible to obtain the smallest ZIP
- file by selecting a single compression algorithm to use for all files to
- be ZIPped. It's not even possible to obtain the smallest ZIP file using
- PKZIP 1.xx's "-ex" option. The ideal is to choose the best compression
- algorithm file by file, from PKZIP 1.xx's Imploding/Shrinking and PKZIP
- 0.9x's Reducing, and that's what SmartZIP does for you.
-
- You'll notice, as you run SmartZIP, that SmartZIP won't use the same
- compression algorithm for every file within a given ZIP file. Since
- it's choosing the compression algorithm file-by-file, SmartZIP might,
- for example, choose Imploding for one file, Shrinking for another and,
- if you're using the "both PKZIPs" option, one of the Reducing levels
- from PKZIP 0.9x might be chosen for some other file. The result is that
- the best compression algorithm is chosen for each FILE individually, not
- for the COLLECTION of files overall.
-
- Is it worth it? I think so. The following table provides statistics
- for a few files for which Imploding (PKZIP 1.xx's minimize-size
- algorithm) did NOT yield the best compression. The algorithm that
- yielded the best compression is marked by an "*". Statistics are from
- PKZIP 1.1 and PKZIP 0.92.
-
- ╔══════╤═════════╤════════╤════════╤════════╤════════╤════════╤════════╗
- ║ File │ Initial │ │ │ Reduced│ Reduced│ Reduced│ Reduced║
- ║ Type │ Bytes │Imploded│ Shrunk │ Level 4│ Level 3│ Level 2│ Level 1║
- ╟──────┼─────────┼────────┼────────┼────────┼────────┼────────┼────────╢
- ║ │ │ │ │ │ │ │ ║
- ║ .TXT │1,018,954│ 352,084│*326,676│ 365,606│ 373,598│ 384,633│ 387,578║
- ║ .TXT │ 80,767│ 27,762│* 27,194│ 30,133│ 30,163│ 30,750│ 31,118║
- ║ .BTR │ 38,912│ 7,461│ 7,968│* 7,441│ 7,489│ 7,582│ 7,842║
- ║ .TXT │ 118,360│ 4,374│ 12,991│* 4,052│ 4,101│ 4,291│ 19,485║
- ║ .TXT │ 8,625│ 2,794│* 2,605│ 2,909│ 2,847│ 2,759│ 2,699║
- ║ .EXE │ 55,269│ 55,389│ 55,389│* 55,255│ 55,271│ 55,274│ 55,274║
- ║ .ZIP │ 5,466│ 5,582│ 5,582│* 5,458│ 5,582│ 5,582│ 5,582║
- ║ .ZIP │ 6,083│ 6,002│ 6,201│* 5,713│ 5,765│ 5,797│ 5,794║
- ║ .COM │ 6,360│ 5,984│ 5,922│* 5,261│ 5,288│ 5,379│ 5,394║
- ║ .ASP │ 7,062│ 2,701│ 2,434│ 2,776│ 2,463│ 2,300│* 2,184║
- ║ .Z00 │ 58,428│ 36,326│ 50,592│* 35,689│ 36,307│ 36,836│ 37,473║
- ║ .Z00 │ 79,002│ 46,353│ 67,597│* 45,138│ 45,646│ 46,525│ 48,336║
- ║ .Z00 │ 88,587│ 49,479│ 72,578│* 48,044│ 48,842│ 50,675│ 52,095║
- ║ .88F │ 80,640│ 11,877│ 13,949│ 10,172│ 10,138│* 10,097│ 10,192║
- ║ .ARC │ 15,593│ 15,167│ 15,711│* 14,585│ 14,685│ 14,810│ 14,933║
- ║ .COM │ 9,516│ 5,508│ 5,954│* 5,199│ 5,303│ 5,343│ 5,408║
- ║ .COM │ 7,777│ 6,373│ 6,715│* 5,755│ 5,756│ 5,768│ 5,856║
- ║ .ZIP │ 20,608│ 20,726│ 20,726│* 20,447│ 20,649│ 20,648│ 20,674║
- ║ .COM │ 6,342│ 5,992│ 5,915│* 5,256│ 5,282│ 5,368│ 5,386║
- ║ .COM │ 9,516│ 5,508│ 5,954│* 5,199│ 5,303│ 5,343│ 5,408║
- ║ .EXE │ 18,649│ 10,101│ 11,998│* 9,820│ 10,089│ 10,236│ 10,502║
- ║ .PIC │ 64,896│ 57,906│ 65,016│ 53,792│ 53,618│ 53,446│* 53,338║
- ║ .PIC │ 64,896│ 47,195│ 51,835│ 45,502│ 45,256│* 44,879│ 44,916║
- ║ .PIC │ 64,896│ 52,502│ 59,491│ 49,855│ 49,518│* 49,062│ 49,072║
- ║ .PIC │ 64,896│ 45,584│ 48,773│ 43,884│ 43,503│ 42,999│* 42,876║
- ║ .PIC │ 64,896│ 52,084│ 58,674│ 49,126│ 48,694│ 48,347│* 48,157║
- ╚══════╧═════════╧════════╧════════╧════════╧════════╧════════╧════════╝
-
- In general, Imploding is a superior compression algorithm; it yields the
- best compression the majority of the time. However, there are enough
- cases where it doesn't to make use of SmartZIP worthwhile. Graphics
- files (.PICs, etc.) and database files, in particular, seem to
- compress best with some level of PKZIP 0.9x's Reducing algorithm.
-
- -----------------------------
- >>>>> How does SmartZIP work?
- -----------------------------
-
- SmartZIP ZIPs all of the files matching the file specification in the
- selected directory into a ZIP file using the ZIP file name specified by
- the user. If the ZIP file exists, it is updated. If it doesn't exist,
- it is created. If the reZIP ("/r") option is being used, the ZIP file
- must exist.
-
- For EACH of the files to be ZIPped, SmartZIP first performs PKZIP 1.xx
- Imploding. It then performs PKZIP 1.xx Shrinking. If you request it,
- SmartZIP will also perform PKZIP 0.9x Reducing level 4, and, if Reducing
- level 4 yields a smaller ZIP file than either Imploding or Shrinking,
- SmartZIP will try the other three Reducing levels, as well, searching
- for improved compression. If Reducing level 4 was no better than
- Imploding or Shrinking, no additional compression is attempted. The
- assumption is that, if Reducing level 4 doesn't yield better compression
- than Imploding or Shrinking, it is unlikely that other Reducing levels
- will, either. Use of this option is HIGHLY recommended. The ZIP
- produced using the optimum compression algorithm isolated by this
- process is then merged into the target ZIP file.
-
- If the compression achieved by all of the algorithms used is the same,
- then Shrinking (PKZIP 1.xx's minimize-compression-time algorithm) will
- be selected.
-
- As SmartZIP executes, it will display several things:
-
- - The name of the file being SmartZIPped.
- - The compression algorithm being tried.
- - The compression size achieved by each compression algorithm
- tried.
- - PKZIP's screen output.
-
- When the optimum compression algorithm is identified, the compressed
- file size achieved will be marked with an asterisk and highlighted, and
- an additional message will be displayed stating that SmartZIP is merging
- the individual ZIP into the target ZIP file and specifying the
- compression algorithm being used.
-
- Note that the "compression size" displayed includes the ZIP file
- overhead, so it won't match the compressed size of the individual file
- exactly; it's usually high by a hundred bytes or so. Therefore, the
- number displayed is only a relative size estimate suitable for the
- purpose.
-
- --------------------
- >>>>> SmartZIP Setup
- --------------------
-
- SmartZIP.EXE and PKZIP.EXE must both be in in a directory specified in
- your PATH. If you wish to use the option to use both PKZIP 1.xx
- Imploding/Shrinking and PKZIP 0.9x Reducing (HIGHLY recommended), you
- must rename PKZIP 0.9x's .EXE file from "PKZIP.EXE" to "PKZIP09.EXE" and
- place it in a directory specified in your PATH, as well.
-
- Make certain that you have ample disk space, particularly if you're
- using the "/r" (reZIP) option. When reZIPping, SmartZIP first unZIPs
- the file to be reZIPped. PKZIP further requires disk space equivalent
- to the final ZIP file size. Although SmartZIP has been tested and
- recovers elegantly from a "disk-full" situation, it's better to avoid
- such marginal conditions.
-
- ---------------------
- >>>>> SmartZIP Syntax
- ---------------------
-
- To run the program, key the following at the DOS prompt:
-
- SMARTZIP [path]zipname [[path]filespec] [/B [/D]] [/K | /O] [/M] [/R]
-
- "zipname" = the name of the ZIP file to be created or updated.
- If not specified, the file extension defaults to
- "ZIP". If an extension is specified, it must be
- "ZIP".
- "filespec" = an optional pattern for specifying the files to be
- SmartZIPped. Wild cards (* and ?) are supported.
- The default is to SmartZIP all files (i.e., *.*).
- "/B" = Use both PKZIPs. Try 1.xx Imploding/Shrinking
- AND 0.9x Reducing. (The default is to try only
- PKZIP 1.xx Imploding/Shrinking.) SEE NOTE BELOW.
- "/D" = "Dumb" ZIPping (with "/b" only). This will force
- SmartZIP to try ALL four levels of reducing for
- each file.
- "/K" = Keep existing ZIP file date.
- "/M" = "Move" files to the ZIP file. The default is to
- add files to the ZIP file.
- "/O" = Set ZIP date to date of latest file.
- "/R" = ReZIP the ZIP.
-
- NOTE: If you wish to use the "/B" option to use both PKZIP 1.xx
- Imploding/Shrinking and PKZIP 0.9x Reducing (HIGHLY recommended),
- you MUST rename PKZIP 0.9x's .EXE file from "PKZIP.EXE" to
- "PKZIP09.EXE" and place it in a directory in your PATH.
-
- SmartZIP has extensive logic for checking syntax and detecting errors.
- When SmartZIP detects an error, a high-intensity error message will be
- displayed along with an "information panel" showing correct syntax and
- brief help information.
-
- --------------------------------------
- >>>>> Error Return Codes (ERRORLEVELs)
- --------------------------------------
-
- SmartZIP returns an error code that can be tested within a batch (.BAT)
- file using the DOS "ERRORLEVEL" variable. Since SmartZIP invokes PKZIP
- (and PKUNZIP, if you're using the "/r" [reZIP] option), error codes from
- the PKWare program will be returned if the PKWare program detects an
- error. In order to avoid confusion between error codes returned from
- PKWare programs and those returned by SmartZIP, all SmartZIP error codes
- are greater than 100. PKWare error codes may be found in the PKWare
- documentation for PKZIP and PKUNZIP.
-
- SmartZIP will return one of the following ERRORLEVELs:
-
- 0 No error; normal completion.
- 1-100 PKZIP/PKUNZIP return codes. See PKWare documentation.
- 101 Nothing to do. No ZIP file or parameter specified.
- 102 Unrecognized option.
- 103 No ZIPname specified.
- 104 Excess parameters.
- 105 PKZIP.EXE not found on PATH or
- /B option specified and PKZIP09.EXE not found on PATH or
- /R option specified and PKUNZIP.EXE not found on PATH.
- 106 ZIP filename extension not valid (i.e., other than ".ZIP").
- 107 ZIP filename not valid.
- 108 File specification not valid.
- 109 ReZIP requested and ZIP file specified does not exist.
- 111 No files found matching file specification.
- 151 Unable to allocate buffer for merge phase. Probable memory
- shortage.
- 152 Unable to open one or both merge input files during merge
- phase.
- 153 Not enough disk space to merge files during merge phase.
- 154 Unable to create merged output file during merge phase.
- 155 ZIP signature size error. Probable truncated ZIP file.
- 156 End central directory signature not found. Probable truncated
- ZIP file.
-
- NOTE: Since SmartZIP creates/updates the ZIP file "in flight", if some
- error is encountered (for example, insufficient space remaining on the
- disk) that forces SmartZIP termination, the ZIP file, if it exists, will
- contain only those files SmartZIPped up to the point of termination. If
- you're using the default ("add" to the ZIP file), you probably won't
- care. However, if you're using the "/M" option ("move" files to the ZIP
- file), you should be aware that the ZIP file contains the files that
- have already been moved into it and should be retained.
-
- ------------------------------------------
- >>>>> SmartZIP Execution Time Optimization
- ------------------------------------------
-
- Although I'm interested in optimum compression, I'm not interested in
- infinite execution time. Although SmartZIP will always identify the
- optimum compression algorithm in as few as two trials and never more
- than six, there are some things you can do to further minimize SmartZIP
- execution time:
-
- - Build the ZIP file on a RAM disk. Since SmartZIP is write-
- intensive, use of a RAM disk will do more to minimize SmartZIP
- execution time than any other single action you can take. The
- easiest way to do this is to change to your RAM disk (i.e., get
- to the point where your prompt is your RAM disk's drive letter)
- and execute your SmartZIP command from there. Paths may be
- specified for the ZIP file and filespec, as necessary.
-
- - Have a large disk cache active. Since PKZIP.EXE is invoked
- multiple times (and PKZIP09.EXE if you're using the "/b" option)
- and each file being SmartZIPped could be read multiple times, a
- large disk cache will also help significantly.
-
- I run SmartZIP with all temporary files residing on a RAM disk and I
- also have a 2048K disk cache active. This results in VERY fast runs,
- even on a 6-MHz PC/AT. On a 20-MHz PS/2 model 80, SmartZIP screams!
-
- ---------------------
- >>>>> Technical Stuff
- ---------------------
-
- SmartZIP was written, compiled and tested using Microsoft's Quick C.
- The final compilation and testing were done using the Microsoft C
- optimizing compiler.
-
- SmartZIP creates temporary files named "JVSMRTZP.xxx". If you terminate
- SmartZIP inelegantly (please don't), you might have to delete these
- files.
-
- -----------------------------------
- >>>>> Who Am I and Do I Want Money?
- -----------------------------------
-
- I'm Joe Vincent and this isn't my day job. I've put a roof over my
- family's heads and food on the table for 30 years as a computing
- professional working in large IBM mainframe installations. I consider
- myself one of those fortunate people who get paid for doing what they
- love to do.
-
- SmartZIP is shareware. That means that you are encouraged to try it to
- see if it meets your needs and, if you decide to keep and use the
- program, register it and pay a reasonable fee ($12 per copy suggested).
- Those who register SmartZIP will receive:
-
- - "MergZIPs", a program that will merge two existing ZIPs together
- without requiring any intermediate unZIPping of either or both of
- the two ZIPs. This program is not available as shareware. It's
- only available as a premium for registering SmartZIP.
-
- - The next release of SmartZIP as soon as it is released.
-
- -----------------
- >>>>> Recognition
- -----------------
-
- I want to recognize the significant contribution made to the computing
- field in general and data compression technology in particular by Phil
- Katz, author of PKZIP, PKUNZIP, et al. SmartZIP invokes PKZIP via the
- Microsoft C "spawn" command. If it weren't for the incredible
- efficiency and speed of PKZIP, SmartZIP wouldn't perform as well as it
- does.
-
- If you don't already have Phil's ZIP utilities, you can obtain them on
- just about any BBS or by contacting PKWare directly at:
-
- PKWARE, Inc.
- 7545 North Port Washington Road
- Glendale, WI. 53217
-
- ----------------------------
- >>>>> Disclaimer of Warranty
- ----------------------------
-
- This software and documentation are distributed "as is" and without
- warranties as to performance or merchantability. The author makes no
- warranties whatsoever, either express or implied, with regard to this
- software and other material distributed with this software and hereby
- disclaims any and all implied warranties of merchantability or fitness
- for a particular purpose. Because of the diversity of conditions and
- hardware under which this software may be used, no warranty of fitness
- for a particular purpose is offered. The user is advised to test the
- software thoroughly before relying on it. The user must assume the
- entire risk of using the software. In no event will the author be
- liable for incidental or consequential damages, including, but not
- limited to, destruction of data or damage to your equipment.
-
- -------------------------
- >>>>> Contact Information
- -------------------------
-
- Registrations, suggestions, comments and reports of anomalous SmartZIP
- behavior should be directed to:
-
- Joe Vincent
- Joseph A. Vincent Consulting
- 805 Pine Way
- Anchorage, Kentucky 40223-2361
- Voice: (502) 244-1541
- Data: Exec-PC BBS,
- (414) 789-4210,
- PC Applications conference,
- File Compression topic.
- PKWare BBS,
- (414) 352-7176