Unzip

By Robert Sprowson

Originally published in EUG #48

This file describes the program Unzip which opens and extracts the contents of a "zip" file into the currently selected directory.

Instructions

At the BASIC ">" prompt, type CHAIN"UNZIP".

The program then asks for the source filename of the "zip" file. Enter this.

After some checks have been made on the "zip" file then the stored files will be unpacked to the currently selected directory, telling you also the date they were stored and a CRC number.

Known Problems/Future Enhancements

No known problems.
The ability to add files to the archive would be handy.
The checksum is not currently used.
Extracting the actual file is presently done with multiple BGETs (Slow).

Exit Messages

File Not Found The specified source file could not be opened
Not A ZIP File The specified start file did not start with the "zip" id
Only Stored Files Can Be UnZIPed Compression is not handled
Not Enough Memory For Extras Field The extras field exceeded 128 bytes
Extras Field Not Written On An Acorn The extras field contains the load and exec addresses but these are missing. They will be set to &00001900 &FFFF8023
Extra Field Of An Unknown FormatThe extras field contains the load exec addresses but these are missing. They will be set to &00001900 &FFFF8023

History

v1.00 Original to replace the inflexible RPSencoding file format on my web pages
v1.01 Fixed error that, if the 'extras' field was missing, the extracted file was 1 byte too small

Manual (C) 1999 Robert Sprowson
Software (C) 1999 SPROW