Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/qdos/IZREADME.SMS  view on Meta::CPAN


       List format (Info-ZIP ('.') or SMS/QDOS ('_')


When the 'Press a key' text is displayed, if you press ESC, then it
waits until you press any other key, infinite timeout. This may be
useful if you want (much) more time to study a listing etc.

Defaults for timeout and directory type are 250 and -1 respectively.

More Goodies
------------

Part of the Zip compression code is now in assembler; it runs
noticably faster than the previous version. Compressing some arbitrary
files with the previous Zip it took 251 seconds, with Zip 2.0.1 it
took (a mere) 170 seconds (68008 QL).

More good news is that SMS/QDOS is just another system option on top
of standard Info-ZIP, unlike the previous ports that were much more
SMS/QDOS specific. For example, compiling the standard source with c68
(i.e. #define QDOS), then you get an SMS/QDOS version.

Compile with Linux/gcc and get the standard Linux version. Now, here's
the cool bit; compile with Linux/gcc and "-DQLZIP", and get a standard
Linux Zip/UnZip with SMS/QDOS (header) extensions.

so, on Linux:

            zip -Q stuff.zip qtpi zip unzip

the -Q tells Zip to look for XTc68/Lux68 cross-compiler data size
blocks and produce a zipfile with SMS/QDOS headers in it (for exec
type programs). This works for exec files produced by the XTc68/Lux68
cross compilers and ANY SMS/QDOS files copied to a Unix or MS-DOS disk
from an SMS/QDOS floppy using 'qltools v2.2' (or later).

Self Extracting Archives
------------------------

Info-ZIP self-extracting archives (_sfx) are created in a rather
'brute-force' way. The UnZipSFX program is prepended to a zipfile.

i.e.          file_sfx = unzipsfx + file_zip
              ex file_sfx

Although the UnZipSFX program is a cut-down UnZip, it is still around
30Kb - 50Kb, depending on platform.

The success of this approach depends on how the operating system
loader loads executable files. On most systems where the loader only
loads the actual program part (Unix, VMS, DOS et al), the this is
quite efficient; if you make, say, a 4Mb zipfile and prepend a 30Kb
UnZipSFX image, then the system only loads the 30Kb program and the
process is efficient as the zipped data part is still unpacked from
disk. These systems also supply the running UnZipSFX program stub with
the path name of the file it was loaded from, so the program knows
what it has to unpack (so on Linux, for example):

     cat /usr/bin/unzipsfx test.zip > test.sfx  # concatenate the files
     chmod 755 test.sfx                         # make executable
     test.sfx                                   # to extract, it
                                                # 'knows' it is "test.sfx"

Unfortunately, the more simplistic nature of SMS/QDOS makes this much
more difficult and rather less efficient as: (see note 1)

     a. The SMS/QDOS 'loader' loads the whole file into memory.

     b. The SMS/DOS 'loader'/c68 run-time system does not return the
        name of the file from which it was loaded.

     c. You cannot so easily create a image file by concatenating two
        files, it is also necessary to ensure the executable file
        header is set correctly.

     d. The show stopper. The data space required for the
        self-extracting archive is required, as not easily maintained
        during electronic transfer.


If anyone is still interested, then the following support for UnZipSFX
is provided.

 o A program 'makesfx' will combine a stub (callstub), UnZipSFX image
   and a zipfile to produce a sfx (self-extracting zip) file.

 o A callable interface is supplied. The user calls the SFX file,
   which creates the files necessary to do the extraction.

The makesfx program concatenates the supplied files to standard
output.

So, to create a sfx of all the _c files in the default directory.

 # 1st create a zipfile of the required files

 ex zip;'ram1_test_zip *_c'

 # Now create the sfx file (ram2_test_sfx)
 # our UnZipSFX image is in 'win1_bin'
 # as is the call stub.

ex makesfx;'-o test_sfx -x win1_bin_unzipsfx -s win1_bin_callstub -z ram1_test_zip'

The arguments to makesfx are:

    -s stubfile
    -x UnZipSFX_program
    -z Zip_file
    -o Output_file

You can now unpack the _sfx file on any SMS/QDOS-compatible
system.

        f$ = "win2_tmp_test_sfx"
        a = alchp(flen(\f$))
        lbytes f$,a
        call a
        rechp(a)



( run in 1.475 second using v1.01-cache-2.11-cpan-f889d44b568 )