home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
CO
/
CO029A.ZIP
/
UNPACKIT.ZIP
/
UNPACKIT.DOC
< prev
next >
Wrap
Text File
|
1986-10-25
|
22KB
|
641 lines
----------------------------------
unPACKIT: for the IBM PC
----------------------------------
PACKIT file unpacker
----------------------------------
unPACKIT is distributed freely and may be copied by anyone for any number
of machines. The author considers unPACKIT to be "shareware" or "freeware".
unPACKIT is a part of the shareware package PC-VCO. If you have subscribed
to PC-VCO, unPACKIT is released for your use. If you wish to use unPACKIT
without subscription to PC-VCO, please support its development and main-
tenance with a subscription of 10.00 dollars. The author may be reached at:
R. (Scott) McGinnis
P.O. Box 3607 Mdse Mart
Chicago, IL 60654-0607
PLINK id: TARTAN
Version 1.0: 861021
R.McGinnis; Chicago
unPACKIT: PACKIT file extractor
Version 1.0: 861021
Table of Contents
-----------------
I. Introduction ................................................. page 1
II. Running the program .......................................... page 3
III. unPACKIT Command Summary ...................................... page 4
IV. unPACKIT Switches ............................................. page 5
V. VCOLIB usage .................................................. page 6
VI. Batch extraction .............................................. page 7
VII. Program Requirements .......................................... page 7
VIII. Program and Author Information ............................... page 8
Appendices
----------
A. MacBinary Header .............................................. page 9
B. PACKIT File structure ......................................... page 10
C. PACKIT Subfile structure ...................................... page 11
D. unPACKIT Error messages ....................................... page 12
unPACKIT: PACKIT file extractor Page 1
Version 1.0: 861021
I. Introduction
unPACKIT for the IBM PC is a utility that extracts files packed together
on a MacIntosh computer with the PACKIT utility. PACKIT on the Mac-
Intosh will pack multiple files together (optionally compressing
and encoding them) into one file. unPACKIT on the IBM PC allows
the extraction of individual files from the PACKIT envelope. Many
files maintained as '.PIT' (the usual PACKIT extension) on Mac BBS's,
Clubs, and SIG's are now accessible to users of the IBM PC.
PACKIT was developed and has been extended by Harry Chesley. PACKIT I
(the original version) simply stored files together, with error checks
designed into the construction. PACKIT II added compression to the
PIT file. PACKIT III added data encryption - simple encryption and
DES encryption - as options. PACKIT versions I/II/III is available as
shareware from Harry Chesley.
unPACKIT is compatible with PACKIT I and II. Data encryption is not
supported. unPACKIT was developed to support the shareware package
PC-VCO for the IBM PC. Face files created on MacIntosh computers
are frequently packed together on the various boards: PLINK, CIS,
Delphi, and GEnie. Now packed face files are available to PC-VCO
users. A packed file may be downloaded to an IBM PC and unPACKIT
used to extract individual face files.
unPACKIT may be copied freely and distributed to anyone for any number
of machines. The author considers this to be "shareware" or "freeware"
unPACKIT is a part of the shareware package PC-VCO. If you have sub-
scribed to PC-VCO, unPACKIT is released for your use. If you wish to
use unPACKIT without subscription to PC-VCO, a contribution is asked.
unPACKIT (and PC-VCO/unPACKIT) will be extended and enhanced if response
warrants.
unPACKIT: PACKIT file extractor Page 2
Version 1.0: 861021
I. Introduction (continued)
What is PC-VCO, by-the-way?
PC-VCO is a communications program for the IBM PC with two sides.
On the one hand, it provides standard comm program functions: a
dialing directory, macros, disc logging, XMODEM and ASCII file
transfer, and so on. However, used with network conferencing
services such as People/Link's PARTY, CompuServe's CB and Delphi's
conference area, PC-VCO provides a way to 'see' and 'hear' people
talking.
The idea for PC-VCO was derived from the VCO system, and its
predecessor VMCO, developed for the MacIntosh computer. The VCO
programs (PC and MacIntosh) allow you to see the people you
communicate with on-line, using the graphic capabilities of the
personal computer and to hear conversation with speech synthesis.
VCO was originally developed by Harry Chesley. It was followed by
VMCO (which is CIS specific), written by Bob Perez independant to
the development of VCO. The current (MacIntosh) version of VCO is
almost an exact duplicate of Harry Chesley's original - the original
source code was converted by Mike Cohen and made to accept multiple
service formats. [Note: Mike Cohen's VCO uses VMCO formated files.
Harry Chesley's VCO files differ. VCOLIB can accomodate either.
PC-VCO in VCO mode can talk to either, according to your choice.]
The MacIntosh VCO allows the user to see the people talking on-line
through graphic Icons. The Icons are provided to the VCO program
as 'Resource files' and are built using a 'Resource Editor'. Each
VCO user must have a resource file for every potential other speaker.
Charlie Brown and Snoopy Icons are used if no 'Faces' are available.
A range of expressions, from 'normal' to bored to surprised make
VCO conferences lively. Each participant controls the expression
displayed to all other participants.
On most large systems, the face files for 20 or more people have
been packed (and compressed) together with the shareware product
PACKIT. The files will be found in the library areas with the
extension of '.PIT'. And thus unPACKIT for the IBM PC !
unPACKIT: PACKIT file extractor Page 3
Version 1.0: 861021
II. Running the program
unPACKIT is invoked at the DOS prompt with the command:
------------------------------------------------------
"d>" unPACKIT <option>
Where "d>" is the DOS prompt, and
<option> is: (<switch> or <cmd> <PIT-File> (<parm> (,<parm> ...)))
where <switch> is one of the following: /+, /-, /B, /D, /R
<parm> is a subfile name,
<PIT-file> is the PACKIT file name to be used,
and <cmd> is one of the following: E,X,L,V
Note: Specifying no commands at all will provide an abbreviated
HELP display summarizing available commands.
------------------------------------------------------
unPACKIT commands and switches are summarized on the next pages.
unPACKIT: PACKIT file extractor Page 4
Version 1.0: 861021
III. unPACKIT Command Summary.
Command Parameter Description
--------- --------- --------------------------------------------------
(E)xtract subfile Extract the specified subfile. Subfile names are
name listed with the 'L' or 'V' commands. Subfile names
are up to 63 bytes in length, and may not contain a
comma or a semi-colon. Case is not significant.
(X)tract subfile Extract the specified subfile. This is simply a
name synonym for the 'E' command discussed above for
those of us who spell phonetically.
(L)ist List the subfiles of the specified PIT file. If a
parameter is given it will be ignored. The list
command gives the following information:
Subfile name (1-63 characters in length)
File Type (4 characters)
File creator (4 characters)
Compression. Compression types are:
PMag - simple compression (PACKIT I)
PMa4 - huffman compressed (PACKIT II)
PMa5 - compressed and encrypted (PACKIT III)
PMa6 - compressed and DES encrypted (PACKIT III)
Note: unPACKIT can only deal usefully with
compression types "PMag" and "PMa4".
(V)erbose List the subfiles of the specified PIT file. If a
parameter is given it will be ignored. The verbose
list give the information above and the following:
Data Fork size: Byte count in the
subfile's Data fork.
Resource Fork size: Byte count in the subfile's
Resource fork.
Creation date: Date the file was created.
Modification date: Date the file was last
modified.
unPACKIT: PACKIT file extractor Page 5
Version 1.0: 861021
IV. unPACKIT Switches.
unPACKIT uses switches to control its output format. In order to
explain these switches, some preliminary explanation is required.
Bear with me if you already understand the following points:
. Files uploaded by a MacIntosh and downloaded by an IBM PC will have
a header called 'MacBinary'. The MacBinary header gives specifics
about the file's name, type/creator, etc. The PIT file used by
unPACKIT must have a MacBinary header, with a type of "PIT " and a
creator of "PIT ". VCOLIB (the face file librarian for PC-VCO)
expects face files offered it for ingestion to have a MacBinary
header.
. MacIntosh files are implemented as 'forks'... each file has a
'Data' and a 'Resource' fork. The Data fork is what we who use
IBM PC's understand to be a file - it is object code, data, a data
base, what-have-you. The Resource fork contains O/S information
such as the ICON to be displayed to represent the file. Again
using VCOLIB as an example: VCOLIB uses only the resource fork of
a face file.
And I don't know why the whole construction isn't referred to as
a fork, and the elements 'tines'.
With this understood, unPACKIT offers the following switches (which
must be entered prior to the command(s) effected):
Switch Description
------- ------------------------------------------------------------
/+ Default condition. A MacBinary header is created for each
file extracted (with the appropriate name, type and creator).
/- No MacBinary header will be output with extracted files. This
would be appropriate if, for example, an encrypted file were
being uncompressed and encryption performed separately.
/B Default condition. Both the Data and Resource forks are to be
extracted (if present). Each will be output as a separate file
on the IBM PC (the name for each file will be queried).
/D Only the Data fork is to be extracted. The Resource fork will
be skipped if present.
/R Only the Resource fork is to be extracted. The Data fork will
be skipped if present.
unPACKIT: PACKIT file extractor Page 6
Version 1.0: 861021
V. VCOLIB usage.
Face files packed together into one PIT file will have certain
characteristics. First of all, the Data fork for each subfile
will be empty (size is 0 bytes). Only the Resource fork is
used. VCOLIB will only accept resource files with one of the
following type/creator values:
Type Creator Usage
---- ------- --------------------------------------------
FACE VCO! File created for use with Mike Cohen's VCO
(this version is mostly used on PLINK)
FACE VMCO File created for use with Bob Perez's VMCO
(this version is mostly used on CIS)
HRC1 HRC1 File created for use with Harry Chesley's VCO
(this version is mostly used on GEnie and Delphi)
For example: you can easily find the file FACES1.PIT in the CIS
MacIntosh Users Group (MAUG) library (DL). Download the file using
an error free binary protocol. It will be seen to conform to the
above description (0 size data forks, and type/creator of "FACEVMCO".
List the file's contents with the command:
"d>" unPACKIT L FACES1.PIT (assuming that is the name you gave it)
Extract an individual face with the command:
"d>" unPACKIT X FACES1.PIT <somebody's name from the listing>
You will be queried for the file name for the extracted subfile.
Choose any name (the face file itself contains the original name,
so the name you use for the file is relatively unimportant) that
does not conflict with a file already on your diskette/subdirectory.
Add the extracted file to PC-VCO's face library with the command:
"d>" VCOLIB A <your library file> <the extracted file's name>
Normally, the library file would be PC-VCO.FLB. You may view the
entry with the command:
"d>" VCOLIB V <your library file> <the name as it was originally>
unPACKIT: PACKIT file extractor Page 7
Version 1.0: 861021
VI. Program Requirements
Version 1.0 of unPACKIT allows redirection of the output (e.g. of the
'L' command to the printer. However, redirection of input is not
supported. Although it may appear obvious to build a contents list
of a PIT file with the command:
d> unPACKIT >TEMP.TXT L JAPANART.PIT ; This works just nicely
and then edit the result - providing blank (empty) lines for files to
be skipped - it won't work. When the edited file is presented to be
processed, e.g. with the command:
d> unPACKIT <TEMP.TXT X JAPANART.PIT ; It doesn't work!
the program terminates abnormally. If this program is extended, this
feature will be one of the first addressed.
unPACKIT will accept the 'X' command with no operand and unpack the
entire contents of the PIT file. The command above (without the
redirection of input, of course) is an example. Simply enter:
d> unPACKIT X <PIT file name>
and every file within the PIT file will be unpacked. You can skip a
subfile with a null entry - a carriage return) at the file name prompt.
And its faster than a selective extraction. Another matter to be
addressed if response warrants.
VII. Program Requirements
This program can only function on an IBM PC or DOS compatible machine.
It uses 'Handle' oriented I/O routines added with DOS 2.0. Therefore
DOS 2.0 is also a requirement.
The current version's memory requirements are modest. unPACKIT will
run in 64K.
unPACKIT: PACKIT file extractor Page 8
Version 1.0: 861021
VIII. Program and Author Information
This program was written using Microsoft Macro-Assembler. The author
likes assembler. Assembly language is an entirely appropriate vehicle
for the program.
unPACKIT, VCOLIB and PC-VCO were written by R. Scott McGinnis of Chicago
Illinois. [PLINK ID is TARTAN]. Comment and suggestions are welcomed.
R. (Scott) McGinnis
P.O. Box 3607 Mdse Mart
Chicago, IL 60654-0607
Credit for information on the MacIntosh must be given to Kelly Major
and Mike Cohen. Both Kelly and Mike helped me make unPACKIT and PC-VCO
possible. I must also thank my wife, Elizabeth, who has helped me at
every step, and smiled upon my vagaries.
unPACKIT (Version 1.1) may be distributed freely, with the caveat that
the Author information displayed at program termination is not removed.
The author considers this to be "shareware" or "freeware". unPACKIT is
a part of the shareware package PC-VCO. If you have subscribed to
PC-VCO, unPACKIT is released for your use. If you wish to use unPACKIT
without subscription to PC-VCO, a contribution of $10.00 is requested.
unPACKIT (and PC-VCO/unPACKIT) will be extended and enhanced if response
(measured by contribution) warrants.
Most of the hardware names and software names (and products not hardware
or software) mentioned in this document are trademarks or trade names of
specific manufacturers.
unPACKIT: PACKIT file extractor Page 9
Version 1.0: 861021 Appendices
A. MacBinary header.
The MacBinary header is 128 bytes in length, and structured:
0 1 2 3 4 5 6 7 65
+------+------+------+------+------+------+------+-----/ /-----+->
! Ver ! FLN ! File Name ... !
+------+------+------+------+------+------+------+-----/ /-----+->
65 66 67 68 69 70 71 72 73
>--+------+------+------+------+------+------+------+------+->
! Type ! Creator !
>--+------+------+------+------+------+------+------+------+->
73 74 ... 126 127
>--+------+-----/ /-----+------+
! Unused by us !
>--+------+-----/ /-----+------+
Where: Ver -------> MacBinary Version Number
FLN -------> Len of following File name (value 0-63)
File Name -> File Name; Used here as Creator ID.
Type ------> Type of file field. We expect "PIT ".
Creator ---> Creator of file field. We expect "PIT ".
unPACKIT: PACKIT file extractor Page 10
Version 1.0: 861021 Appendices
B. PACKIT file structure.
The PACKIT file is a concatenated series of subfiles, with
a MacBinary Header. After the MacBinary header, a PACKIT
file looks like:
+------+------+------+------+--//
! Type (4 bytes) ! Subfile 1
+------+------+------+------+--//
+------+------+------+------+------+------+--//
! 1st subfile contents (variable length) !
+------+------+------+------+------+------+--//
+------+------+------+------+--//
! Type (4 bytes) ! Subfile 2
+------+------+------+------+--//
+------+------+------+------+------+------+--//
! 2nd subfile contents (variable length) !
+------+------+------+------+------+------+--//
... And so on. Lastly, there is:
+------+------+------+------+--//
! EOF Type (4 bytes) !
+------+------+------+------+--//
Type Contents
---- ---------------------------------------------------
"PMag" Simple packed file
"PMa4" Compressed subfile (huffman encoded)
"PMa5" Compressed subfile (huffman) and simple encryption
"PMa5" Compressed subfile (huffman) and DES encrypted
"PEnd" EOF indicator
unPACKIT: PACKIT file extractor Page 11
Version 1.0: 861021 Appendices
C. PACKIT Subfile structure.
Each subfile is structured:
+------+------+------+------+
! Header !
+------+------+------+------+
! !
/ / Data fork / /
! !
+------+------+------+------+
! !
/ / Resource fork / /
! !
+------+------+------+------+
! Data/Resource CRC !
+------+------+------+------+
------------------------------------------------------------
The header has the following structure:
Field Length Contents
------- ------- --------------------------------------------
NameLen 1 Length of NAME field in bytes (1-63)
Name 63 Name of subfile
Type 4 File type (as type above in MacBinary header)
Creator 4 File creator (as creator above)
Flags 1 Finder flags
1 one byte of filler to preserve word alignment
Locked 2 File locked if non-zero
DSize 4 32 bit count of bytes in data fork
RSize 4 32 bit count of bytes in resource fork
CrDate 4 file creation date ! Count in seconds since
ModDate 4 file last modified ! Jan 1, 1904
CRC 2 CRC for above header
------------------------------------------------------------
Note: If the subfile type indicates compression, the header
as described above is compressed along with the data and the
resource forks. The DSize and RSize fields refer to the un-
compressed file size... therefore the entire subfile must be
uncompressed in order to get to the next subfile!
------------------------------------------------------------
unPACKIT: PACKIT file extractor Page 12
Version 1.0: 861021 Appendices
D. unPACKIT Error messages.
------------------------------------------------------------
... Parameter error
The command line, as entered after the invocation of unPACKIT could
not be interpreted. Re-type the command line.
------------------------------------------------------------
... File name syntax error
unPACKIT follows the SEA/ARC convention of placing the file name of the
file to be manipulated after the first command and before the parameters
of that first command. unPACKIT could not interpret the expected name.
------------------------------------------------------------
... File is not PACKIT format
The file specified is not identified as a PACKIT file in its MacBinary
header (the first 128 bytes). Type must be "PIT " and creator "PIT ".
------------------------------------------------------------
Short read reading subfile header
The PACKIT file has been truncated - only part of its contents are
available for extraction.
------------------------------------------------------------
Warning: Subfile header CRC does not match computed CRC.
The PACKIT file has been corrupted. Or the author has a bug. If
the file is downloaded a second time, and the error persists, its
probably a bug. Please contact the author.
------------------------------------------------------------
Subfile type unrecognized.
The PACKIT file has been corrupted, or a PACKIT IV has been released.
------------------------------------------------------------
Position past EOF requested.
The PACKIT file has been truncated - only part of its contents are
available for extraction.
------------------------------------------------------------
Huffman tree is corrupt. I can not use it.
Decoding information could not be loaded from a compressed file. The
file could be corrupt, or the author (again) may have a bug.
------------------------------------------------------------
Warning: Subfile contentual CRC does not match computed CRC.
The PACKIT file has been corrupted. Or the author has a bug. If
the file is downloaded a second time, and the error persists, its
probably a bug. Please contact the author.