@database UnSquish.guide
@(c) "1997 Stephen Williams"

@node "MAIN" "UnSquish 2.0"
@next "Intro"

                                 @{b}UnSquish 2.0@{ub}
                             by @{"Stephen Williams" link "Steffan" 0}
                         Release date: June 26, 1997

                             @{" Introduction      " link "Intro" 0}
                             @{" Shell Usage       " link "Shell" 0}
                             @{" Workbench Usage   " link "WB" 0}
                             @{" Tooltypes         " link "Tooltypes" 0}
                             @{" Limitations       " link "Bugs" 0}
                             @{" Acknowledgements  " link "Ack" 0}
                             @{" Program History   " link "History" 0}
                             @{" About Compressors " link "Packers" 0}
                             @{" Legal Matters     " link "Legal" 0}

@endnode

@node "Intro" "UnSquish 2.0 Introduction"
@prev "MAIN"

@{b}What is UnSquish?@{ub}

An interface to the XFD library, operable from Shell or Workbench.
In plain English, this means that UnSquish is a virtually universal
decompressor.  It will unpack most packed files (but not archives).


@{b}How to install UnSquish@{ub}

Drag the icon to whereever on hard- or floppy-disk you want to install
it.  You must also have xfdmaster.library version 37 or above
installed in LIBS:.  If you don't have a suitable version, one is
supplied in the UnSquish/libs/ directory.  Just copy it into LIBS:.
xfdmaster.library is © of @{"Georg Hörmann" link "Ack" 0}.

If you want to use UnSquish from @{"Workbench" link "WB" 0}, you will need
reqtools.library version 38 or above in LIBS: as well; UnSquish uses
reqtools.library for its file selector, and for various other
functions.  I have supplied a recent version of reqtools.library in
UnSquish/libs/. reqtools.library is © of @{"Nico François" link "Ack" 0} and
@{"Magnus Holmgren" link "Ack" 0}.

UnSquish requires AmigaOS release 2.00 or newer (Exec version 36 or
greater).


@{b}Unpacking XPK files with UnSquish@{ub}

In order to unpack XPK files, you must have xpkmaster.library
installed in LIBS:, and the relevant sublibraries installed in
LIBS:compressors/.  These files are not included; anybody using XPK
files will have them already :-)


Next section: @{"Shell Usage" link "Shell" 0}

@endnode

@node "Shell" "UnSquish 2.0 Usage from Shell"
@next "WB"
@prev "Intro"
Previous section: @{"Introduction" link "Intro" 0}


@{b}How to use UnSquish from Shell@{ub}

Format:   UnSquish <source file> [destination file] [PASSWORD=password]

Template: UnSquish SOURCE/A,DESTINATION,PASS=PASSWORD/K

UnSquish will read the file specified by SOURCE into memory and
attempt to decompress it.  If decompression is successful, UnSquish
will write the decompressed file out to disk with the name specified
by DESTINATION.  If DESTINATION was omitted, UnSquish will replace the
original file.  UnSquish will ask for confirmation before overwriting
any file.  Partial files written as a result of a failed save will not
be deleted; this "feature" may be changed in a future release.

DESTINATION can be a directory instead of a file, in which case
UnSquish will save the new file into this directory, with the
original name.

@{u}Examples@{uu}

To decompress file "foo":
  @{i}UnSquish foo@{ui}

To decompress file "foo", saving the new file with name "bar":
  @{i}UnSquish foo bar@{ui}

To decompress file "foo" in the C: directory, saving the new file
as "foo" in the current directory:
  @{i}UnSquish C:foo ""@{ui}
or
  @{i}UnSquish C:foo foo@{ui}

To decompress file "foo" in the current directory, saving the
new file in the RAM disk:
  @{i}UnSquish foo RAM:@{ui}
or
  @{i}UnSquish foo RAM:foo@{ui}

To decompress file "foo" in the current directory, saving the
new file in the RAM disk with name "bar":
  @{i}UnSquish foo RAM:bar@{ui}


@{u}The PASSWORD parameter@{uu}

If the compressed file has been encrypted (eg with PowerPacker, or
XPK FEAL), a password must be supplied for UnSquish to be able
to decompress the file.  This is done by putting the password on
the command line, prefixed with "PASSWORD=".  The abbreviation
"PASS=" may be used  Upper or lower case may be used for the
prefix, though the password may be case sensitive, depending on the
encrypter used.

If a password is specified for a non-encrypted file, it will have
no effect.

You may not be too keen on the password being visible on the command
line.  @{"Workbench" link "Loadgad" 0} usage of UnSquish circumvents this problem.

@{u}Examples@{uu}

Decrypt the file "foo" in the current directory, with password "bar":
  @{i}UnSquish pass=bar foo@{ui}
or
  @{i}UnSquish password=bar foo@{ui}
or
  @{i}UnSquish foo pass=bar@{ui}
or
  @{i}UnSquish foo pAsSwOrD=bar@{ui}
etc etc... :-)


Next section: @{"Workbench Usage" link "WB" 0}

@endnode

@node "WB" "UnSquish 2.0 Usage from Workbench"
@prev "Shell"
@next "Filegad"
Previous section: @{"Shell Usage" link "Shell" 0}


@{b}How to use UnSquish from Workbench@{ub}

While UnSquish is a perfectly good @{"Shell" link "Shell" 0} decompresser, its real purpose
is as a GUI interface to xfdmaster.library.

Run UnSquish by double-clicking its icon.  A window will open,
resembling the following wonderful piece of ASCII art:

            []=UnSquish 2.0==============================[][]
            ||                                             ||
            ||  @{" Filename                    " link "Filegad" 0} @{" Size   " link "Sizegad" 0}    ||
            ||                                             ||
            ||  @{" Status bar                            " link "Statgad" 0}    ||
            ||                                             ||
            ||  @{" Load " link "Loadgad" 0}    @{" Save " link "Savegad" 0}    @{" About " link "Aboutgad" 0}    @{" Quit " link "Quitgad" 0}    ||
            ||                                             ||
            ++---------------------------------------------++

Click on a window feature for information on that feature.

UnSquish also has a @{"menu" link "Menu" 0}, and several @{"keyboard shortcuts" link "Keys" 0}.


Next section: @{"Tooltypes" link "Tooltypes" 0}

@endnode

@node "Filegad" "UnSquish 2.0 Usage from Workbench"
@prev "WB"
@next "Sizegad"

@{b}The Filename display@{ub}

This display contains the name of the file currently @{"loaded" link "Loadgad" 0}.  If no
file is loaded, the display will contain "No file loaded".


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Sizegad" "UnSquish 2.0 Usage from Workbench"
@prev "Filegad"
@next "Statgad"

@{b}The Size display@{ub}

This display contains the size in bytes of the file currently @{"loaded" link "Loadgad" 0}.
If no file is loaded, the display will contain a zero.

When a file is first loaded, this display will contain the initial
(ie compressed) size of the file.  After decompression, this display
will contain the decompressed size of the file.


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Statgad" "UnSquish 2.0 Usage from Workbench"
@prev "Sizegad"
@next "Loadgad"

@{b}The Status display@{ub}

This display contains information about the current status of the
program (eg "Ready", "Waiting for input"), to complement the
information given by various requesters that appear during the normal
course of operation.


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Loadgad" "UnSquish 2.0 Usage from Workbench"
@prev "Statgad"
@next "Savegad"

@{b}The Load button@{ub}

Pressing this gadget will open a ReqTools file selector, allowing
the user to select a file to decompress.  You may also select a file
by dropping its icon into UnSquish's window.

Once a file has been selected, any existing file in memory will be
purged, and the new one loaded.  If it is compressed, UnSquish will
show a requester asking you if you want to decompress it.  Canceling
this requester will unload the file; confirming it will decompress the
file.  Once the file has been decompressed, UnSquish will return
control to you, allowing you to save the decompressed file, or select
another one.

If the compressed file is encrypted, UnSquish will show a ReqTools
string requester for you to enter the password.  The password will
not appear on the screen as you type it in.

You will be informed of any errors which occur during decompression.

WARNING: UnSquish will @{i}not@{ui} ask for confirmation before purging any
file in memory before loading a new one.  It is up to you to make sure
you've saved a decompressed file before loading another.


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Savegad" "UnSquish 2.0 Usage from Workbench"
@next "Aboutgad"
@prev "Loadgad"

@{b}The Save button@{ub}

Pressing this gadget will open a ReqTools file selector, allowing
you to pick a filename to save the decompressed file to.  The
file will not be purged after a save, so you can make as many saves
as you like.

You will be informed of any errors which occur during saves.  A save
error will @{i}not@{ui} cause the file in memory to be purged; only selecting
another file, or quitting the program, will cause this.  Any partial
file written as a result of a bad save will not be deleted; this
"feature" may change in a future version.

If the original file had an icon, you will be given the option to save
a copy of this icon with the new file.

If there is no file in memory to save, the Save button will be
disabled.


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Aboutgad" "UnSquish 2.0 Usage from Workbench"
@next "Quitgad"
@prev "Savegad"

@{b}The About button@{ub}

Pressing this gadget will open the obligatory information requester.


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Quitgad" "UnSquish 2.0 Usage from Workbench"
@next "Menu"
@prev "Aboutgad"

@{b}The Quit button@{ub}

Pressing this gadget will quit UnSquish.  There is no "Are you sure"
requester, so make sure you've saved any file in memory before you
quit the program.

Pressing the close gadget on the window's title bar has the same
effect as pressing the Quit gadget.


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Menu" "UnSquish 2.0 Usage from Workbench"
@next "Keys"
@prev "Quitgad"

@{b}The Project menu@{ub}

+-------------+
| Load...  @{i}A@{ui} O|  · equivalent to pressing the @{"Load" link "Loadgad" 0} gadget
| Save...  @{i}A@{ui} S|  · equivalent to pressing the @{"Save" link "Savegad" 0} gadget
+-------------+
| About... @{i}A@{ui} ?|  · equivalent to pressing the @{"About" link "Aboutgad" 0} gadget
+-------------+
| Quit     @{i}A@{ui} Q|  · equivalent to pressing the @{"Quit" link "Quitgad" 0} gadget
+-------------+


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Keys" "UnSquish 2.0 Usage from Workbench"
@next "Tooltypes"
@prev "Menu"

@{b}Keyboard shortcuts@{ub}

The following keyboard shortcuts are recognized:

RCOMMAND-O - equivalent to pressing the @{"Load" link "Loadgad" 0} gadget
RCOMMAND-S - equivalent to pressing the @{"Save" link "Savegad" 0} gadget
RCOMMAND-? - equivalent to pressing the @{"About" link "Aboutgad" 0} gadget
RCOMMAND-Q - equivalent to pressing the @{"Quit" link "Quitgad" 0} gadget
ESCAPE     - equivalent to pressing the @{"Quit" link "Quitgad" 0} gadget


@{"Back to Workbench Usage" link "WB" 0}

@endnode

@node "Tooltypes" "UnSquish 2.0 Tooltypes"
@prev "Keys"
@next "Bugs"
Previous section: @{"Workbench Usage" link "WB" 0}


@{b}Tooltypes@{ub}

UnSquish recognizes one Tooltype at present: TOPAZ.
Unsquish will attempt to adapt its GUI to the screen font, provided
that the screen font is smaller than 20 points.  If the screen font
is larger than this, UnSquish will use the Topaz 8 point font instead.
Setting the TOPAZ Tooltype instructs UnSquish not to try to adapt to
the screen font whatever size it is, but to always use the Topaz-8
font.


Next section: @{"Limitations" link "Bugs" 0}

@endnode

@node "Bugs" "UnSquish 2.0 Limitations"
@prev "Tooltypes"
@next "Ack"
Previous section: @{"Tooltypes" link "Tooltypes" 0}


@{b}Bugs and Limitations@{ub}

UnSquish cannot be interrupted during a decompression.  I know of no
way of interrupting xfdmaster.library while it is decompressing.  If
I ever find a way, I will incorporate it into UnSquish.

UnSquish does not support the decompresion of files encrypted with a
numeric key, rather than a password.  xfdmaster.library supports this
feature; UnSquish does not because I do not have any of these
encrypted files to test it with.  If and when I obtain a suitable
encrypter with which to test this feature, it will be supported.

Executables that have been packed by @{"absolute address packers" link "Packers" 0} get
irrevocably altered by them.  Whilst UnSquish will unpack the
programs, they will not work in their decompressed state.
Fortunately, not many people use this kind of packer any more.  The
most common Amiga packers (PowerPacker, Imploder, XPK) are perfectly
safe, as far as I know.  Georg Hörmann's program @{i}xfddecrunch@{ui} is
the best I know of for attempting to repair programs broken by
absolute address packers.

People who have been using xfdmaster.library for some time will know
that extra decrunch modules (called "slaves") are available for it.
Whilst UnSquish does try to use these slaves, I have had no luck with
them.  This seems to be a problem with the slaves themselves rather
than with UnSquish; @{i}xfddecrunch@{ui} by Georg Hörmann gave the same errors.
This should not present much of a problem, as all the common
decrunchers are included in xfdmaster.library.  Only a few obscure
ones exist as slaves.


Next section: @{"Acknowledgements" link "Ack" 0}

@endnode

@node "Ack" "UnSquish 2.0 Acknowledgements"
@prev "Bugs"
@next "History"
Previous section: @{"Limitations" link "Bugs" 0}


@{b}Acknowledgements@{ub}

UnSquish uses decompression routines from xfdmaster.library, © of
Georg Hörmann.  Without Georg's superb coding, UnSquish would not have
been possible.

reqtools.library is © of Nico François and Magnus Holmgren.

Thanks must go to my beta-testers:
  Dave Hardenbrook
  Dave Jones
  Dave Manley (all these Daves... :-)
  Chris Underwood
  Glen Watts

Without the help of these people, UnSquish would contain more bugs
than an antmound.


Next section: @{"Program History" link "History" 0}

@endnode

@node "History" "UnSquish 2.0 Program History"
@next "Packers"
@prev "Ack"
Previous section: @{"Acknowledgements" link "Ack" 0}

@{b}Program History@{ub}

- Version 0.1 (21.8.96, beta release)
· First release.

- Version 1.0 (25.9.96, first public release)
· Small bug in window drawing code fixed.
· Now requires xfdmaster v37+ (previously required v36+).

- Version 1.1ß1 (11.10.96, aborted beta release)
· UnSquish now saves files with the same permissions as the loaded
  file; ie if a crunched file had protection set to hprwed, the
  decrunched file will have the same permissions.  Previously, all
  saved files had permissions set to rwed.  The exception is that
  UnSquish will always clear the archive "a" bit.  This is standard
  behaviour for a program which saves files.
· If invoked on a pre-AmigaOS 2 machine, UnSquish now simply exits,
  instead of reporting an error.  The error message had been sent to
  STDOUT; because the routines to write to STDOUT are quite large,
  this alteration removes about 2.5Kb from the size of UnSquish!
  I decided that keeping the program small was more important than
  writing this error.

Version 1.1ß1 was never released.  I was not satisfied with the
operation of version 1.x of the program; the GUI was downright lame.
UnSquish was put on hold, until...

- Version 2.0ß1 (26.3.97, beta release)
· Program totally rewritten from scratch.
· Development language changed from Pascal to C.
· Separate Shell and Workbench functionality.
· Proper Amiga GUI (menus, buttons, drag and drop).
· Font-adaptive GUI.
· Support for password-encrypted files.
· Support for external XFD "slaves".

- Version 2.0 (26.6.97, public release)
· Public release of version 2.0ß1.


Next section: @{"About Compressors" link "Packers" 0}

@endnode

@node "Packers" "UnSquish 2.0 Information"
@next "Legal"
@prev "History"
Previous section: @{"Program History" link "History"}


@{b}About Compressors@{ub}

File packers are great.  However, some are more efficient than others.
As an example, take the old packer "Turbo Squeezer".  Whilst it packs
pretty well, newer packers (such as my favourite, Imploder) are more
efficient, both in terms of file size and speed.  However, Imploder
has no option to decrunch files packed with old packers.  This is
where programs like UnSquish come in.  Armed with UnSquish, you can
decompress programs compressed with old packers, and recrunch them
with Imploder (no, the authors of Imploder (Peter Struijk and Albert
Brouwer) are *not* paying me commission! :-)

Many old packers produce executables that break on newer versions of
the Amiga's operating system.  As long as the original file was not
altered by the packer before packing, UnSquish will be able to restore
these programs simply by unpacking them.  You will then be free to
repack them with a more modern packer if you wish.

Imploder does not support data files, only executables.  For data, I
recommend the XPK system.  If you have xpkmaster.library installed,
XFD (and hence UnSquish) will decompress files compressed with any of
the XPK slaves that you also have installed.

Isn't is confusing that XPK and XFD look so similar :-)

Never use dirty "absolute address" packers.  It is impossible to
decrunch them properly.  Programs like @{i}xfddecrunch@{ui} (by Georg Hörmann)
can *sort-of* get them decrunched and working.  But it isn't easy;
UnSquish doesn't even try.


Next sections: @{"Legal Matters" node "Legal" 0}

@endnode

@node "Legal" "UnSquish 2.0 Legal Matters"
@next "Steffan"
@prev "Packers"
Previous section: @{"About Compressors" link "Packers"}


@{b}Legal Matters@{ub}

xfdmaster.library is copyright by Georg Hörmann;
reqtools.library is copyright by Nico François and Magnus Holmgren.

UnSquish is copyright ©1996, 1997 by Stephen Williams.

UnSquish is not in the public domain.  It may not be modified in any
way.  No-one may make any profit from UnSquish.

The author can not be held responsible for any loss, injury, damage or
swan obsession caused as a direct result of using UnSquish.

This version of UnSquish is a freeware public release.  It may be
uploaded to FTP sites or bulletin boards.  It may be distributed by PD
libraries, provided only a nominal charge is made for the cost of the
media and postage.  Magazines may distribute UnSquish on their cover
disks or CDs; if you wish to do this, please @{"contact me" link "Steffan" 0} first and tell
me.  Thanks!


@{"Back to top" link "MAIN" 0}

@endnode

@node "Steffan" "UnSquish 2.0's Author"
@prev "Legal"

@{b}How to contact the author@{ub}

Send snail-mail to:

  Stephen Williams,
  9, Helmsley Way,
  Spalding,
  Lincolnshire,
  PE12 6BG,
  England.

During University term time, contact me by:

  email: S.Williams\@warwick.ac.uk
  IRC:   Steffan on IRCnet #amiga
  (This account expires in June 1998)


@{b}Other software by Stephen Williams@{ub}

@{u}Cookies v4.3@{uu} (Aminet util/misc/Cookies.lha)

  A fortune cookie engine, with a ReqTools or Shell interface.  It's
  easy to customize with new fortunes, and has PowerPacker support.

@{u}Condition: Green!@{uu} (Aminet mods/med/condgreen.lha)

  A happy little 4-channel MED module.

@{u}Switch v1.0@{uu} (Aminet util/misc/Switch.lha)

  An Intuition based metric conversion utility, which can be used
  to convert between most common metric and British measures.

@{u}Zeller v1.0@{uu} (Aminet util/time/Zeller.lha)

  A perpetual calendar, capable of displaying and printing the calendar
  for any month between January AD1700 and December AD2100.

@{u}File v1.0@{uu} (Aminet util/misc/File.lha)

  An Amiga version of the Unix "file" command, which uses FileID.library
  to identify most file types.  It also offers a drag and drop interface
  when started from Workbench.

@endnode
