Win-GZ -- Windows GZip
Windows 9x/NT/etc. gzip/gunzip program

COPYRIGHT

  Copyright (C) 2000-2003 by Bob Crispen <revbob@crispen.org> doing
  business as Foxy Software.

  Portions of this code are based on minigzip.c, Copyright (C) 1995-2002
  Jean-loup Gailly, distributed with zlib 1.1.4 by Jean-loup Gailly and
  Mark Adler, at <http://www.gzip.org/zlib/>.

  The file COPYING-2.0.txt describes the license for Win-GZ.

  The file README_too.txt describes the licensing for those parts of Win-GZ
  that were derived from minigzip.c.

WHAT DOES Win-GZ COST?

  Nothing.  The program is distributed without charge under the terms of
  the licenses in COPYING-2.0.txt and README_too.txt.

WHERE CAN I GET THE LATEST VERSION?

  <http://www.crispen.org/src/#wingz>

WHAT IS Win-GZ?

  Win-GZ is a Win32 program that will gzip and gunzip files on your system.

HOW DO YOU PRONOUNCE Win-GZ?

  I pronounce it "wings", as in "hot wings", my favorite lunch.  The
  name "Wingz" was already taken by a spreadsheet program available at
  <http://sal.kachinatech.com/G/4/WINGZ.html>, hence the hyphen.

WHAT'S GZIP?

  Gzip is a file compressor.  Gunzip is a gile uncompressor.  Win-GZ
  has a front end for both, and automatically checks the file you
  select so that you won't try to gzip a file that's already gzipped
  or gunzip a file that isn't gzipped.

WHERE CAN I FIND OUT MORE ABOUT GZIP?

  <http://www.gzip.org/> has the source for gzip and gunzip and binaries
  for various platforms.  One reason I created Win-GZ is that the only
  Win32 version of gzip available there was a console application.

WHAT'S THE DIFFERENCE BETWEEN GZIP AND PKZIP/WINZIP?

  (a) PKZip is a proprietary program owned by PKWare and is subject to
      their license.  WinZip is a proprietary program owned by WinZip
      Computing Inc. and is subject to their license.  Gzip is open
      source software and is subject to the Gnu General Public License.

  (b) PKZip produces .zip files.  Gzip produces .gz files.

  (c) Gzip often produces smaller files than PKZip.

  (d) Browsers and plugins for Virtual Reality Modeling Language (VRML)
      and Hypertext Markup Language (HTML) can read gzipped files, but
      not zipped files.

  (e) PKZip can combine several files together in an archive.  Gzip,
      in keeping with the Unix philosophy that tool should do one thing
      and do it very well, works on one file at a time.  While there
      are facilities within newer versions of gzip to gzip several files,
      you will almost never see an example of it being used that way.
      Win-GZ only compresses or uncompresses one file at a time.

WHAT PROGRAMS CAN READ GZIPPED FILES?

  Well, there's Win-GZ itself, of course.  If you have a lot of Microsoft
  Office files or PostScript files, you can get megabytes of disk space
  back by gzipping them.

  Another place to save space is in your web pages.  Most web servers
  will serve a file called "whatever.html.gz", and most web browsers
  will display that file properly.  I almost said "all" web browsers,
  but surely someone has written a broken web browser that won't do it.
  I know for sure Netscape, MSIE, and Opera (all versions) will display
  gzipped web pages properly, and it is part of the HTTP standard.

  Try it yourself: <http://www.crispen.org/etc/special_chars.html.gz>.
  Note that some web servers may be configured to gzip files on the fly,
  so you won't really save any download time with those web servers.
  Still, if you have a few big web pages, you'll certainly save some
  disk space on your web server if you gzip those files.

  Then there's the regular gunzip console app (see above), which will
  read all files Win-GZ produces.  The gzip format is a standard and runs
  on many platforms.  A .gz file produced by one program on one platform
  should be readable by any gzip program on any platform.

  WinZip will read, but not write, gzipped files (that's why I created
  Win-GZ).

  All known VRML browsers will read gzipped files, even if the last three
  characters of the file name aren't ".gz".

HOW DO YOU INSTALL Win-GZ?

  Unzip wingz.zip and install win-gz.exe anywhere.  The only DLLs it
  requires will already be on your system, and since Win-GZ doesn't
  use any exotic features of those DLLs, it shouldn't matter what
  versions you have.

  You may want to go to the folder where you installed Win-GZ, right
  mouse on win-gz.exe and select "Create Shortcut", then cut and paste
  it into your Start menu (typically C:\Windows\Start Menu\Programs).
  "Accessories" sounds like a reasonable place to put it, but it
  doesn't matter.

HOW DO YOU RUN Win-GZ?

  Pick one:

  (a) Go to the folder where you installed Win-GZ and double-click the
      icon for win-gz.exe.

  (b) If you installed a shortcut to Win-GZ in your Start menu, select
      "Start", select "Accessories" (or wherever you put the shortcut),
      and Win-GZ.

  (c) Open an Explorer window.  Select View/Options or Tools/Folder
      Options (depending on which your system has).  Click the "File
      Types" tab.  Select a file type you'd like to use Win-GZ on (for
      example, VRML users may want to do this for VRML files).  Click
      Edit (or Advanced, depending on which your system has).  On the
      "Edit File Type" menu click New.  Call the new action "Win-GZ".
      Browse to the folder where you installed Win-GZ and select that
      for the program to perform the action.

      Now when you right mouse on a file of that type and select Win-GZ,
      Win-GZ will open that file, check whether or not it's gzipped,
      and activate the button (Gzip or Gunzip) that's appropriate.

  (d) Click Start and Run.  Type in the pathname for Win-GZ, any command
      line options you want to use (see below) and optionally the pathname
      for the file you want to open in Win-GZ.  You may use quotes around
      the name of the file you want to open or not.

WHAT DO THE OPTION BUTTONS DO?

  (a) "Keep Original" -- If you select, e.g., "foo.wrl" and press
      "Gzip", it will create a file called "foo.wrl.gz" and leave your
      original file as it was.  If you select "foo.wrl.gz" and press
      "Gunzip", it will create a file called "foo.wrl" and leave your
      original file as it was.  This is the default behavior for most
      Windows zip/unzip programs.  If you're used to Windows zip/unzip
      programs, check this option.

  (b) "Delete Original" -- If you select "foo.wrl" and press "Gzip",
      it will create a file called "foo.wrl.gz" and delete "foo.wrl".
      If you select "foo.wrl.gz" and press "Gunzip", it will create a
      file called "foo.wrl" and delete "foo.wrl.gz".  This is the
      default behavior for gzip/gunzip.  If you're used to gzip/gunzip
      on Unix, check this option.

  (c) "Name as Original" -- If you gzip a VRML file the normal way and
      name it "foo.wrl.gz", because of a bug in Microsoft Internet
      Explorer and in some versions of Microsoft Web servers, your
      Web browser may fail to properly identify the file as a VRML file.
      Users of the MS-DOS shell version of gzip customarily rename
      "foo.wrl.gz" to "foo.wrl", even though the file is gzipped, to
      overcome this bug.

      Win-GZ takes care of this for you in one step.  If you check this
      option, the result is that you'll be left with a file of the same
      name, but the contents will either be gzipped or gunzipped,
      depending on which you selected.

COMMAND LINE OPTIONS

  Although most people don't execute Win-GZ from the command line, you
  can definitely use command line options in your shortcuts and right-
  mouse menu items.

	-u or -unix:	Use this option if you prefer Win-GZ to come up
			with the second option ("Delete Original") already
			checked.

	-v or -vrml:	Use this option if you prefer Win-GZ to come up
			with the third option ("Name as Original") already
			checked.

	filename:	Anything that appears in the command line besides
			the path to win-gz.exe itself, -u[nix], or -v[rml]
			is treated as a filename you want Win-GZ to open.

  If you've created a shortcut to Win-GZ on your Start menu and want
  Win-GZ to come up with the second option ("Delete Original") checked,
  go to that shortcut in explorer (usually in C:\Windows\Start Menu\
  Programs\Accessories), right-mouse on the icon, select Properties,
  and add " -u" or " -unix" after the path to Win-GZ.

  If you've created a right-mouse menu item for Win-GZ, open an Explorer
  window.  Select View/Options.  Click the "File Types" tab.  Select the
  file type you've selected Win-GZ to appear in the right-mouse menu on.
  Click Edit.  On the "Edit File Type" menu select "Win-GZ" and click Edit.
  Add " -u" or " -unix" after the path to Win-GZ in the "Application used
  to perform action" window.

  If you bring up Win-GZ with one of the command line flags set, you can
  always change your mind and select another option.

WHAT ABOUT FUNNY FILE NAMES?

  Win-GZ doesn't care about file names or extensions.  It looks inside
  the file instead of looking at the file name.

  If you select a gzipped file that isn't named "foo.wrl.gz" and you've
  checked "Keep Original", Win-GZ will ask you if you want to save the
  file as "gztemp" in the same directory or cancel the operation.

  If you choose to gzip "foo.wrl" and "foo.wrl.gz" already exists,
  Win-GZ will ask you if you want to overwrite it or cancel the operation.

  If you choose to gunzip "foo.wrl.gz" and "foo.wrl" already exists,
  Win-GZ will ask you if you want to overwrite it or cancel the operation.

WHAT IF Win-GZ FAILS?

  In every case, regardless of which option you choose, your original file
  is untouched until Win-GZ finishes compressing or uncompressing your file
  completely and correctly.

  In case of an error (you'll be warned by a popup dialog box), the output
  file will almost certainly be bad, but Win-GZ leaves it around in case
  you want to try to work with it as is.  In most cases, you should delete
  the output file.

WHAT CAN CAUSE Win-GZ TO FAIL?

  (a) Gunzip fails on a file you downloaded from the net.  This usually
      means: (i) that the file got corrupted during download, (ii) that
      the Web server sent a binary file as text, or (iii) that the file
      was corrupt on the Web site or FTP site.  Try another download, or
      download the file from a different site.

  (b) Adding ".gz" to create a new file name "foo.doc.gz" for the output
      file pushes the pathname length over the edge and makes it larger
      than Windows will allow.  Either shorten the file name or move the
      file into a different folder, perhaps a folder higher in the
      directory tree, so that its pathname is shorter.

  (c) When creating the duplicate file, Win-GZ fills up the disk.
      Even if you select "Delete Original" or "Name as Original", there
      will be two files on your disk, at least for a brief time: the
      compressed file and the uncompressed file.  There is no other way
      to ensure that your original file isn't destroyed by an error except
      doing it this way.  And, yes, I have considered using the Temp
      directory, but that would prevent you from converting very large
      files when your C: drive is crowded.  When Win-GZ over-fills your
      disk drive, move the file to a partition that has more free space
      or move other files out of the partition to make room for the file
      Win-GZ generates.

  (d) If you get an error that doesn't fall under these headings, email
      me: revbob@crispen.org

WHAT DO THE MESSAGES IN THE STATUS BAR MEAN?

  Well, at least you're reading what the status bar says.  Some people
  never do, even though it's right in front of their noses.

  (a) When it says "Ready", it's ready for you to select a file.  Both
      the "Gzip" and "Gunzip" buttons are disabled.

  (b) When it says "Can't open <file>" it means that for some reason
      it found the file but can't open it.  The likeliest explanations
      are: (a) you are not permitted to read that file or (b) somehow
      an illegal character got into the filename.  Both the "Gzip" and
      "Gunzip" buttons are disabled.  Select another file, rename the
      file (you may have to copy it and delete the original) or exit.

  (c) When it says "<file> (empty)" it means that the file has been
      found and successfully opened, but it's empty.  Both the "Gzip"
      and "Gunzip" buttons are disabled.  The console app of gzip will
      let you gzip an empty file, but I made a design decision not to
      let you do that because I saw no reason why anyone would want to,
      and because too few people read the status bar messages.

  (d) When it says "<file> (gzipped) in <dir>" it means that the file has
      been found and successfully opened, and it's a gzipped file.  The
      "Gunzip" button will be enabled.  When you press the "Gunzip"
      button, the file will be gunzipped into <dir> -- the same folder
      that the original file is in.

  (e) When it says "<file> (not gzipped)" it means that the file has been
      found and successsfully opened, and it is not a gzipped file.  The
      "Gzip" button will be enabled.  When you press the "Gzip" button,
      the file will be gzipped into <dir> -- the same folder that the
      original file is in.

  (f) When it says "Gzipping <file> <n>%", it means that it's <n> percent
      done gzipping that file.  The progress bar also displays the
      precentage done.

  (g) When it says "Gunzipping <file> <n>%", it means that it's <n> percent
      done gunzipping that file.  The progress bar also displays the
      percentage done.

      NOTE: Gunzip almost always goes faster than gzip.  If you don't
      see the progress bar move, or if it just flickers, that means that
      the file was small and the progress bar moved too fast for you
      to see.

  (h) When it says "Gzipped file: <path>", it means that it's done with
      gzipping the file, and you can find the file it created in <path>.
      The progress bar is blank, and the "Gzip" and "Gunzip" buttons
      are disabled.  Select another file or exit.

      NOTE: some error conditions may leave the results in a different
      file than you expect.  For example, you may have selected "Name
      as Original" but you don't have write privileges for the original
      file.  If this happens, you'll always see a popup window informing
      you of the error, and the status bar will show you where the file
      actually is.

  (i) When it says "Gunzipped file: <path>", it means that it's done with
      gunzipping the file, and you can find the file it created in <path>.
      The progress bar is blank, and the "Gzip" and "Gunzip" buttons are
      disabled.  Select another file or exit.  See the note on (h) above.

I WANT TO GZIP (OR GUNZIP) A FILE, BUT THAT BUTTON IS INACTIVE!

  Win-GZ has read that file and sees that it's already gzipped (or
  that it isn't gzipped), and is gently but firmly preventing you from
  doing it again.  You can gzip a file twice (with some programs), but
  then you have to gunzip it twice to get back to something useful.

  I made a design decision not to let you do that.  You can email me
  and complain if you like.

  If you absolutely have to gzip a file twice or gunzip a file that
  isn't gzipped, get the console version of gzip from
  <http://www.gzip.org/>.

BOTH THE GZIP BUTTON AND THE GUNZIP BUTTON ARE INACTIVE!

  You haven't selected a file yet, or the last operation is done and
  Win-GZ is waiting for you to select another file.  Do that, and one
  of them should become active.

WHAT IF I WANT TO GZIP OR GUNZIP MORE THAN ONE FILE AT A TIME?

  You should get the console version of gzip and gunzip from
  <http://www.gzip.org/>.

WHAT'S THE SOURCE CODE FOR?

  Win-GZ is open source.  This means you can use the code in another
  application and modify it, provided you adhere to the terms of the
  license.  See COPYING-2.0.txt and README_too.txt.

  The source is known to compile on Jacob Navia's LCC-Win32 compiler,
  and Microsoft Visual C++ 6.0, and may, perhaps with some
  modifications, compile on other C and C++ compilers for Windows.

  In order to link the executable, you must get zlib 1.1.4, by Jean-loup
  Gailly and Mark Adler, at <http://www.gzip.org/zlib/>.  It's also
  necessary to use zlib.h and zconf.h from the zlib distribution to
  compile Win-GZ, and it may be convenient to copy those files to the
  src directory.

  I have made a port of zlib to lcc, and you can get it at
  <http://www.crispen.org/src/zlib_lcc.zip>.  Note that this is different
  from the zlib.lib which comes with lcc.  The latter library contains
  only external symbols and requires zlib.dll to accompany any
  application program you build using that library.

  If you don't want to do anything with the source, you can delete it
  and Win-GZ will still work.

  NOTE: The terms of the license say very clearly that you must
  distribute both the license and the source with Win-GZ, or else tell
  users where they can get the license and source.  If you want to
  distribute Win-GZ to others and you haven't modified it, the easiest
  way to avoid violating the license is to keep a copy of the original
  distribution file (wingz.zip) and distribute that.

VERSIONS

  1.2 -- 3 March 2003 -- Incorporates zlib 1.1.4 which was released to
  address a security issue with earlier versions of zlib.  Added version
  information to the executable properties (reachable from the right
  mouse button in Windows Explorer).  Fixed progress indications overflow
  with very large files.  Took debug symbols out of release version.

  1.1 -- 10 March 2000 -- Discovered that there's a popular spreadsheet
  for Linux called Wingz.  Changed the name of the program to Win-GZ and
  the name of the executable to win-gz.exe to avoid confusion.  Finally
  actually fixed the command line problem.  Added -u[nix] and -v[rml]
  options.

  1.01 -- 7 March 2000 -- Minor bugfixes: when the pathname is taken from
  the command line, it no longer mistakenly disables the Gzip and Gunzip
  buttons.  Added help/about.  Added documentation.  Made the window look
  a little nicer.  Blanked the progress bar when the operation was done.

  1.0 -- 7 March 2000 -- Initial release.

COOKIE:

  In the menu that comes up when you press "Select File" the default is
  "All files", but you can also select "VRML files", and that may help if
  you have a crowded directory.  It's a tiny gift to my VRML building
  friends.

KNOWN BUGS AND POSSIBLE ENHANCEMENTS:

  (1) If the size of a file is larger than 4,294,967,295 bytes, the
  progress bar may cycle back and forth more than once.  I probably
  won't fix this, since I don't have any files that big to test it on.

  (2) Win-GZ could theoretically build its output file on the disk
  partition that has the most room.  I probably won't implement this
  either, because it could leave the file where casual users won't
  be able to find it easily, and it might possibly interfere with other
  applications like hard disk recording programs that require a
  partition to be pristine.  The final reason not to do that is that
  the Unix version of gzip doesn't do it.

  (3) A user has discovered that gzipping a partial pkzip archive which
  spans multiple floppies will create a gzipped file which can't be
  opened with WinZip.  WinGZ will successfully gunzip this file.  Still
  being worked.

REPORTING BUGS:

  Email me at revbob@crispen.org and report what you were doing and
  what happened.  Keep the file you were working on around, but do NOT
  email the file to me unless I ask you to.
