Self-extracting ZIP
Self-extracting ZIP is a family of a executable/ZIP hybrid formats. On a compatible operating system, such a file can be executed, and it will extract the files contained in it.
Alternatively, it can usually be processed as if it were a ZIP file, even on an incompatible operating system. Renaming the file to end in ".zip" may make this easier.
Contents |
Format details
A self-extracting ZIP archive usually consists of an "executable stub" segment, followed by the part of the file containing the ZIP-formatted data.
In EXE-based formats, the ZIP data is usually placed in the "overlay" segment. So, signature bytes 'P' 'K' 0x03 0x04
usually appear at the start of the overlay segment, sometimes after a padding byte.
DOS files made by PKZIP
Most versions of PKZIP for DOS include a ZIP2EXE.EXE utility that converts a ZIP file to a self-extracting archive. The files it creates can perhaps be put into four classes:
- The format made by PKZIP 0.90 to 1.02. Creating such files involves a convoluted method whereby the executable stub is copied from the original distribution file (e.g. PKZ090.EXE). The user must enable the feature by using the included MAKESFX.COM utility to generate the not-included PKSFX.PRG file required by ZIP2EXE.EXE. Every self-extracting EXE then begins with the bytes in PKSFX.PRG.
- The "standard" format made by v1.10. The executable stub seems to be significantly different from earlier versions. Also, as of v1.10, the MAKESFX.COM method is no longer used.
- The "standard" format made by v2.04c and higher. The executable stub is pre-compressed with PKLITE.
- The "PKSFXjr" format supported by v1.10+, selected using ZIP2EXE's
-j
option. This is also known as "Mini" or "Junior" format. PKSFXjr files have a smaller size overhead, but limited features. Only a single compression method is supported (Implode or Deflate, depending on the version).
Software
- PKZIP - Refer to ZIP#Software.