Dec 312017
 
New Archive Utility. Checks for smallest file size between .ZIP and .LZH archives and creates smallest size in an .SQS archive file. Slow but very file space efficient.
File SQUISH.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
New Archive Utility. Checks for smallest file size between .ZIP and .LZH archives and creates smallest size in an .SQS archive file. Slow but very file space efficient.
File Name File Size Zip Size Zip Type
SQUISH.EXE 22607 11960 deflated
SQUISH20.DOC 10279 4311 deflated

Download File SQUISH.ZIP Here

Contents of the SQUISH20.DOC file


SQUISH ver 2.0 beta [9-24-89] (c) 1989 Barbara Chambers FN/DC 408-335-4387

----------------------------------------------------------------------

Documentation:

Finally, a program for those who can't make up their mind! Since the
introduction of PKZ101, there has been indecision in my mind whether to use
it for file compression, or whether to use LHARC113. Neither results in the
smallest compression all of the time. Pkz101 seems to have an advantage in
large EXE files, and some large database and text files. Lharc is often most
efficient in collections of small files, and small EXE files. For medium
size files, its up in the air - either could result in the best compression.
In my system, PKzip had a slight advantage over LHarc - but the advantage
applied to only about 60% of the files there, not a clear 'win' at all.

So, what to do? Write a program which tries both ways, and uses the
smallest result file. So SQUISH! Since everyone is creating new
archive formats nowadays, I thought I'd follow -- SQUISH creates an output
file with the extension '.SQS'. The .SQS file is the smaller of the .LZH and
.ZIP files created with SQUISH.

To run SQUISH, you must have LHARC.EXE, PKZIP, and PKUNZIP in the current
directory, or accessible through the DOS path environment variable.

SQUISH version 2.0 accepts 5 commands: add, move, update, view, and
extract, as follows:

-a: Place files in new SQS archive
-m: Move files to new SQS archive
-u: Place files in new SQS archive
-x: Extract files from SQS, LZH, or ZIP archive
-v: View SQS, LZH, or ZIP archive contents

MOVE, ADD, AND UPDATE COMMANDS:
In general, PKZIP and LHARC treat these commands as if they were passed on
directly to them. However, some important differences should be kept in
mind when using the move, add, or update commands:
1) SQUISH will create two files, the ZIP file having the extension ZIP and
the LZH file with the extension LZH. If a file with the same name as the LZH
or ZIP file exists, it is temporarily renamed with the extension L$- or Z$-
respectively, then hidden. It is unhidden and restored to its original name
following creation of the SQS file. Normally, this will not be significant,
as you are unlikely to have an identical filename to the SQS file, differing
only by having an extension LZH or ZIP, which is specified to be compressed.
A trivial example: suppose you have a directory containing two files,
TEST.ZIP and BIGFILE.EXE. If you execute SQUISH -A TEST *.* within that
directory, SQUISH finds the conflict with TEST.ZIP, so it hides it. When
done, your directory contains TEST.ZIP, BIGFILE.EXE (both unchanged), and
TEST.SQS. And TEST.SQS contains only a compressed version of BIGFILE.EXE.
2) The first file to be created is the ZIP version. Therefore, the MOVE
command is treated as an ADD command for the ZIP file, and the MOVE is
executed when the LZH file is created. MOVEd files are then deleted, and are
contained within the resulting SQS file.
3) You are allowed to tell SQUISH to create an archive with the extension
ZIP or LZH or even ABC; however, when creating files the extension you type
is ignored, and an SQS file is created.
4) Obviously, in order for SQS to correctly decide which packing method is
appropriate, it must build both files from scratch. Otherwise, one file
added to an existing archive would result in a larger file size than the
other archive which would contain only a single file. Therefore, the file
list to be included in the archive must be complete, and the add and update
commands are essentially identical in operation since each originates an
archive. If an identical SQS files exists already, it is overwritten. The
move command also originates an archive, but deletes files as it processes
them on the second pass. SQUISH version 2.1 will have the following new
commands:

-as: Add files to existing SQS archive, retaining LZH or ZIP method used.
-ms: Move files to existing SQS archive, retaining LZH or ZIP method used.
-us: Update files in existing SQS archive, retaining LZH or ZIP method used.

...which will make SQUISH more general-purpose in nature, though
compromising the certainty of obtaining the best possible packing as new
files are added, since the packing method will not be switched.


VIEW AND EXTRACT COMMANDS:
These commands work similarly to the way they are implemented in LHARC and
PKZIP, with one difference -- any file with ANY extension which is compressed
using LZH or ZIP will work! If you don't specify an extension, SQUISH will
look for SQS, LZH, and ZIP versions of the file you specified, and if it
finds only one, will use that file. It will even work on a file with an
extension like DJ3 if SQUISH can identify it as packed by LZH or ZIP. This
makes SQUISH a universal (within LZH and ZIP) viewing and extracting tool!


INVOCATION: (no praying necessary)
Invoke with the following formats:
SQUISH -x [] [...]
SQUISH -v [...]
SQUISH <-a | -m | -u> []...[]]


APPLICATION:
Want to convert an entire directory of either .LZH files or .ZIP files to
.SQS files? Try using SQUISH with Scott Samet's excellent program
XCHANGE.EXE version 1.03, available on many bulletin boards as XCH103.ZIP. It
will allow you to change between compression formats, including .ARC, .ZIP,
.PAK, .ZOO, .LZH, and of course, .SQS. SQUISH will have to be included in
the XCHANGE.CFG file (see the documentation for XCHANGE.) Here is a sample
entry to enable SQS in the XCHANGE.CFG file:

;
.SQS
>SQUISH -m $n *.*
;


RESULTS:
In every case I've tested, SQS results in the most efficient compression
method in terms of file size, or at least equal to ZIP or LZH alone. It is
slow, of course -- its doing two passes for each file! But for those who
want to squeeze the last bit of space out of their system, it is appropriate.
Note, however, that I'm making no guarantees of any sort - TRY IT TO YOUR OWN
SATISFACTION UNDER SAFE CONDITIONS FIRST, AND THEN USE IT AT YOUR OWN RISK.
ALSO, READ THE INSTRUCTIONS!


COST:
This isn't shareware, its freeware! But please don't make patches in it.
(You won't be able to run it with patches anyway.) Leave me a note on
Digicomputronica (408-335-4387) or Turbocity (209-599-7435 [FidoNet 1:208/2])
if you see any bugs or would like some changes -- I'll be glad to revise the
program!


REVISION HISTORY:

09-23-89 First Release - version 1.0, after an obsessive all-nighter.
Done with TurboC 2.0.
09-23-89 Fixed bug with display of lzh, zip file size for large files.
09-24-89 Version 2.0 (beta)
Rewrote everything, eliminating DESQUISH, and putting in lots
of traps for unsafe conditions. SQUISH version 1.0 should be
destroyed if you have it - its not entirely immune to getting
confused and erasing source archives! This new version is
2.0, a beta version, but is apparently safe to use (as
directed). Gary Lagier of Turbocity BBS has kindly charged
me with his enthusiasm, and offered to be a beta test site
and central distribution node for SQUISH. I'm converting all
my files here to SQS. The Lharc bug with the pathnames
(requiring trailing backslashes) is fixed to be compatible
with Pkzip format. The hidden files feature replaces simple
renaming to avoid self-archiving, overwriting, and conflicts
such as appeared in version 1.0. Version 1.1 never made it
out the door.



ERRORLEVELS ON EXIT:

0 Everything seems OK.
1 No SQS, LZH, or ZIP file found, and extension not given.
2 reserved
3 Too few arguments
4 Wildcards found in the archive filespec
5 No extension given, but more than one file found with SQS, LZH, or ZIP.
6 V or X operation with extension specified, but file not found.
7 V or X operation on an archive which is found but cannot be read.
8 V or X operation on a file too short to be LZH or ZIP.
9 V or X operation on a file without LZH or ZIP signiture.
10 Unrecognized or missing command.
11 Unrecognized command or no leading dash.
12 Program integrity breached.
13 Reserved
14 More than one extract pathname specified.
15 Output pathname given for view command.


Addendum to SQUISH20.DOC:

Here are some archiving tests done with some files in my root directory.
Most of the 'mixtures' are a collection of small exe and batch files. Notice
that LZH worked better generally on small files - whereas ZIP was clearly
superior with large ones. Having even a few monster files in a directory
tends to give the advantage to ZIP overall! Of course, the SQS results were
always the best, both individually and overall. In this table, the packing
method chosen by SQS is marked with an asterisk:

LZH ZIP SQS TYPE OF FILE
-----------------------------------------------------------------------------
B 95562* 96638 95562 Mixture of files beginning with "b"
BAT 2650* 5046 2650 About 30 small batch files
C 16706* 17443 16706 Mixture of files beginning with "c"
COMS 123326* 125343 123326 About 25 small COM files
D 52570* 52757 52570 Mixture of files beginning with "d"
M 11939* 12644 11939 Mixture of files beginning with "m"
MICR 59931* 60059 59931 MICROTXT.EXE, a medium large executable
QD2HLP 36878 33607* 33607 QD2.HLP, a medium text file
SYSOPMAN 121252 111851* 111851 SYSOPMAN.PRN, an enormous text file
WP 150832 149402* 149402 WP.EXE, a large executable
X 16520* 16890 16520 About 5 files beginning with "x"
-----------------------------------------------------------------------------
TOTALS 688166 682504 675771*



 December 31, 2017  Add comments

Leave a Reply