Self-extracting archive
Encyclopedia
A self-extracting archive (SFX for short) is a computer application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 which contains a file archive
Archive file
An archive file is a file that is composed of one or more files along with metadata that can include source volume and medium information, file directory structure, error detection and recovery information, file comments, and usually employs some form of lossless compression. Archive files may be...

, as well as programming to extract this information. Such file archives do not require a second executable file or program to extract from the archive, as archive files usually require. The files in an archive can thus be extracted by anyone, whether they possess the appropriate decompression program or not, as long as the program can run on their computer platform.

The original purpose for the self-extracting archive was to allow the distribution of tools for extracting (and adding) member files to an archive file. The situation otherwise, in effect, represents a "chicken and egg" problem: in order to use an archive file, the user requires a de-archiver program, which they have to be able to get onto their computer. If the de-archiver program was simply a single executable with no other files, it would be possible to simply download that one file, then execute it. But if the means to unarchive files required, say, an executable program and several libraries, there would be no way to obtain them as a single download or executable which could be installed unless the unarchiver program itself (along with accompanying files) were a self-extracting archive.

Several programs can create self-extracting archives. For Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 there are WinZip
WinZip
WinZip is a proprietary file archiver and compressor for Microsoft Windows and Mac OS X, developed by WinZip Computing...

, WinRAR
WinRAR
WinRAR is a shareware file archiver and data compression utility developed by Eugene Roshal, and first released in autumn of 1993. It is one of the few applications that is able to create RAR archives natively, because the encoding method is held to be proprietary.-Developer:The current developer...

, 7-Zip
7-Zip
7-Zip is an open source file archiver. 7-Zip operates with the 7z archive format, but can read and write several other archive formats. The program can be used from a command line interface, graphical user interface, or with Microsoft Windows shell integration. 7-Zip began in 1999 and is actively...

, KGB Archiver
KGB Archiver
KGB Archiver is a file archiver and data compression utility based on the PAQ6 compression algorithm.Written in Microsoft Visual C++ by Tomasz Pawlak, KGB Archiver is designed to achieve a very high compression ratio...

, and the built-in IExpress
IExpress
IExpress is a Microsoft utility bundled with various editions of Windows operating systems : Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, and Windows 7...

 wizard. For Macintosh
Macintosh
The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

 there are StuffIt
StuffIt
StuffIt is a family of computer software utilities for archiving and compressing files on the Macintosh and Microsoft Windows platforms: it was originally produced for the Macintosh. An old version for Linux and Sun Solaris 2.7 or later is also available...

, The Unarchiver
The Unarchiver
The Unarchiver is a free data decompression frontend of libxad, which supports more formats than Archive Utility , the built-in archive unpacker program in Mac OS X. It can also handle filenames in foreign character sets, created with non-English versions of other operating systems. The latest...

, and 7zX. There are also programs that create self-extracting archives on Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 as shell scripts which utilizes programs like tar and gzip (which must be present in destination system). Others (like 7-Zip
7-Zip
7-Zip is an open source file archiver. 7-Zip operates with the 7z archive format, but can read and write several other archive formats. The program can be used from a command line interface, graphical user interface, or with Microsoft Windows shell integration. 7-Zip began in 1999 and is actively...

 or RAR) can create self-extracting archives as regular executables in ELF
Executable and Linkable Format
In computing, the Executable and Linkable Format is a common standard file format for executables, object code, shared libraries, and core dumps. First published in the System V Application Binary Interface specification, and later in the Tool Interface Standard, it was quickly accepted among...

 format. An early example of a self-extracting archive was the Unix shar
Shar
In the Unix operating system, shar is an archive format. A shar file is a shell script, and executing it will recreate the files. This is a type of self-extracting archive file. It can be created with the Unix shar utility...

 archive, in which one or more text files were combined into a shell script that when executed recreated the original files.

Downsides

The main downside of self-extracting archives is that running executables downloaded from the Internet may pose a security risk. With a regular archive, one could open it with an unarchiver without running any foreign code. However, with an executable, it is not possible to clearly verify whether an archive contains a malicious program.

Another issue with self-extracting archives is that they are platform-specific. For example, a self-extracting archive for Windows will not run on Mac OS X.

Self-extracting archives also include additional code in order to properly run and to display any user messages for the installation. While this amount of extra data is usually small, it could defeat the purpose of compressing lossy file types, such as a group of .jpeg images. The small amount of data that would have been saved by compressing the .jpeg files would be cancelled out by the addition of extra programming code in order for the executable file to self-extract properly.

See also

  • Installer
  • Shar
    Shar
    In the Unix operating system, shar is an archive format. A shar file is a shell script, and executing it will recreate the files. This is a type of self-extracting archive file. It can be created with the Unix shar utility...

  • Kolmogorov complexity
    Kolmogorov complexity
    In algorithmic information theory , the Kolmogorov complexity of an object, such as a piece of text, is a measure of the computational resources needed to specify the object...

    , a theoretical lower bound on the size of a self-extracting archive
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK