;
                                  ZTYPE.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
              19k (149)  DADB  1.0        Carson Wilson 7/90       Z3COM8

  1- Usage  2- Operation  3- Specifications  4- Notes                         


   ZTYPE is  a text  file  display  utility for ".ZIP" files.   .ZIP files are 
libraries of compressed subfiles created with Phil Katz's PKZIP file archiving
program for MS-DOS.   For the first time,  ZTYPE allows CP/M users to view the 
contents of such files without first extracting them.   ZTYPE  works  with all 
CP/M 2.2, CP/M 3.0, and compatible systems having at least 45.5k of TPA.
:1
 Usage - 1/2 

   To use ZTYPE, first extract ZTYPE.COM from this library and rename it to 
ZTYPE.COM if necessary.  Then type

     ZTYPE                     for help
     ZTYPE //

     ZTYPE ufn                 to display all members of a .ZIP
     ZTYPE ufn.ZIP               file at the current directory.

     ZTYPE dir:ufn             to display all members of a .ZIP
     ZTYPE dir:ufn.ZIP           file at another directory.
                                 "dir:" stands for either a Z 
                                 System named directory or a 
                                 drive letter, user number, or 
                                 drive letter followed by a user 
                                 number.
 Usage - 2/2 

     ZTYPE ufn ufn             to display a single member of a 
     ZTYPE ufn.ZIP ufn           .ZIP file at the current 
                                 directory.

     ZTYPE dir:ufn ufn         to display a single member of 
     ZTYPE dir:ufn.ZIP ufn       a .ZIP file at another 
                                 directory.

In addition,  the Z System GO command can be used to  reinvoke  ZTYPE.   Other
command forms cause ZTYPE to  abort  with an  error  message.   Under Z System
version 3.4, access security is enforced by the command processor.  Users will
not have access to protected directories  unless they know the directory pass-
word.  Further, ZTYPE does not even attempt to process files whose type is not
".ZIP" (if no type is specified, .ZIP is assumed).  Therefore while ZTYPE will
display $SYStem files with the type .ZIP even under secure systems,  it cannot
be used under ANY system to detect $SYS files with other filetypes  (including
no filetype).
:2
 Operation - 1/4 

   A .ZIP file created with PKZIP contains up to four kinds of member files:

     - "Stored" files (uncompressed)
     - "Shrunken" files
     - "Reduced" files
     - "Imploded" files

   ZTYPE  will  display  text  files  stored  using  any  of  these methods if
sufficient transient  program  area (TPA) is available.    Other  types of ZIP
file members, distinguished  by the  file  types .EXE, .COM, .OBJ, .BIN, .ZIP,
.SYS,  .DAT,  .DTA,  .GIF,  or  .PIF are  considered  binary files and will be
skipped by ZTYPE.
 Operation - 2/4                                                   

                                COMMANDS

   While running, ZTYPE accepts several commands from the keyboard:

     ^S             pause the output until another key is 
                      pressed.

     ^X             skip the file being displayed and go on to 
                      next member, or quit if this is the only 
                      match.

     ^C             abort and return to the operating system.

     ^Z             disable "paging" for the rest of the file 
                      being displayed (^S still allows pausing).
 Operation - 3/4 

   Since the compression  methods used by  PKZIP are sophisticated,  a certain
amount of time is required for the  decompression itself.   This is especially
noticable  while  the  first  screen  of  an  "Imploded"  ZIP  file  member is
processed.   To indicate that activity is indeed taking place,  ZTYPE displays
the characters "-", "\", "|",  and "/" in sequence at the same screen location
while processing data.   These are the  equivalent  of  a  "Wait" message or a
clock icon.   All of the  keyboard  commands  also  work  during this phase of
operation, so it is possible (for example) to skip  a file  before  ZTYPE even
displays the first screen of text  by pressing ^X while the activity indicator
is on.
 Operation - 4/4 


                         Self-Extracting ZIP Files 

   The PKZIP package can  produce  "self-extracting"  ZIP  files.   These  are
archive files that can be  "executed"  under  MS-DOS by typing the name of the
archive file at the system prompt.   When a self-extracting ZIP file is run it
extracts its member files to disk without the need for a separate  "unZIPping"
utility.   Self-extracting  ZIP files  have the  filetype .EXE,  as opposed to
.ZIP.  At present ZTYPE will not process self-extracting .ZIP files.


                           ZIP File Directories

   Due to memory constraints,  no archive directory  capability has been built
into ZTYPE.  However, Steve Greenberg has already furnished the CP/M community
with just such a utility, named ZIPDIR.COM.   ZIPDIR.COM is found at many CP/M
bulletin boards in the file ZIPDIR10.LBR.
:3  
 Specifications 

   ZTYPE will run on any  CP/M 2.2,  3.0,  or compatible  system with at least
45.5k of TPA (transient program area).   This is  equivalent to  a memory from 
100h through B300h.   All "vanilla"  64k CP/M systems  should  have sufficient 
memory.   However it is  quite  possible to reduce  TPA below this figure when 
multiple operating  system  enhancements  (especially CP/M 2.2  RSX's)  are in 
effect.

   Since "shrunk" members require about  25k of workspace to decompress,  this
type of .ZIP file member will no  longer be  viewable  when  TPA  falls  below
45.5k.   Instead,  ZTYPE will display a "TPA error" message and proceed to the
next .ZIP file member.   Since it allocates memory dynamically, however, ZTYPE
will continue to operate with most types of .ZIP file  members  even  when TPA
falls below 45.5k.

   ZTYPE will display the members of .ZIP files created with Phil Katz's PKZIP
programs, through version 1.1.
:4
 ZTYPE Notes 

   a. ZTYPE is derived  from  UNZIP20.ZIP,  copyright 1989 by Samuel H. Smith.
      Phil Katz's APPNOTE.TXT from PKZIP110.EXE, which describes the structure
      of .ZIP files, was also consulted.  Finally, considerable credit goes to
      Leor Zolman, author of BDS C,  a versatile and  efficient C compiler for
      CP/M, without which ZTYPE would have been impossible.
