ZTYPE - ZIP file display for CP/M Version 1.0, Copr. 30 Jul 90 by Carson Wilson Sysop, Antelope Freeway RAS, 312/764-5162, Chicago. CONTENTS -------- 1 Short Description. 2 Usage. 3 Operation. 3.1 Commands. 3.2 Self-Extracting ZIP Files. 3.3 ZIP File Directories. 4 Specifications. 5 Credits. 1 Short Description. 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. 2 Usage. 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. 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 password. 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 system to detect $SYS files with other filetypes (including no filetype). 3 Operation. 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, considered binary files and will be skipped by ZTYPE. 3.1 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). 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. 3.2 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 files. 3.3 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. 4 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. 5 Credits. 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. BDS C is available from Sage Microsystems East, 1435 Centre St., Newton Centre, MA 02159-2469, phone 617-965-3552 (voice, 9 am - 11:30 pm), 617-965-7259 (modem, pw=DDT).