ArticleslgStudy

science

Self-extracting archive

Self-extracting archive is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Self-extracting archive rather than just read about it. In short: A self-extracting archive (SFX or SEA) is a computer executable program which combines compressed data in an archive file with machine-executable code to extract the information. Running on a compatible operating system, it does not need a suitable extractor in the target computer to extract the data.

Self-extracting archive — main illustration
Self-extracting archive — illustration

Key takeaways

  • Self-extracting archive belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Self-extracting archive to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Self-extracting archive from memory before moving on to harder problems.

Reference excerpt

A self-extracting archive (SFX or SEA) is a computer executable program which combines compressed data in an archive file with machine-executable code to extract the information. Running on a compatible operating system, it does not need a suitable extractor in the target computer to extract the data. The executable part of the file is known as a decompressor stub. Self-extracting files are used to share compressed files with a party that may not have the software needed to decompress a regular archive. Users can also use self-extracting archives to distribute their own software. For example, the WinRAR installation program is made using the graphical GUI RAR self-extracting module Default.sfx.

Overview Self-extracting archives contain an executable file module, which is used to run uncompressed files from compressed files. The latter does not require an external program to decompress the contents of the self-extracting file and can run the operation itself. However, file archivers like WinRAR can still treat a self-extracting file as if it were any other type of compressed file. By using a file archiver, users can view or decompress self-extracting files they received without running executable code (for example, if they are concerned about viruses). A self-extracting archive is extracted and stored on a disk when executed under an operating system that supports it. Many embedded self-extractors support a number of command-line arguments, such as specifying the target location or selecting only specific files. Unlike self-extracting archives, non-self-extracting archives only contain archived files and must be extracted with a program that is compatible with them. While some formats of self-extracting archives cannot be extracted under another operating system, non-self-extracting ones can usually still be opened using a suitable extractor. This tool will disregard the executable part of the file and extract only the archive resource. The self-extracting executable may need to be renamed to contain a file extension associated with the corresponding packer; archive file formats known to support this include ARJ and ZIP. Typically, self-extracting files for Microsoft operating systems such as DOS and Windows have a .exe extension, just like any other executable file. For example, an archive may be called "somefiles.zip—it", which can be opened under any operating system by a suitable archive manager that supports both the file format and compression algorithm used. It may also be converted into somefiles.exe, which will self-extract under Microsoft Windows. It will not self-extract under Linux but can be opened with a suitable archive manager. Files that are not recognized as archives by archive managers due to their executable extension can be renamed into .zip. This works for ZIP archives due to the way the ZIP header is defined, but not necessarily for other less flexible archive formats. There are several functionally equivalent but incompatible archive file formats, such as ZIP, RAR, 7z, and others. Many programs can handle multiple types of archives, whereas others can create, extract, or modify only one type. Additionally, there is a distinction between the file format and the compression algorithm. A single file format, such as 7z, can support multiple different compression algorithms, including LZMA, LZMA2, PPMd, and BZip2. Decompression utilities must be able to handle both the file format and the algorithm used when expanding self-extracting or standard archives. Depending on the options used to create a self-extracting archive, the executable code placed at the beginning may vary. When comparing a LZMA 7z archive to a LZMA2 7z archive, for example, the decompression routines will differ. Several programs can create self-extracting archives. Among the Windows archivers are WinZip, WinRAR, 7-Zip, WinUHA, KGB Archiver, Make SFX, the built-in IExpress wizard, and others, including experimental ones. Macintosh users can choose among StuffIt, The Unarchiver, or 7z X as their archivers. There are also programs that create self-extracting archives on Unix as shell scripts, which utilize programs like tar and gzip (which must be present in the destination system). Others (like 7-Zip or RAR) can create self-extracting archives as regular executables in ELF format. One of the early examples of self-extracting archives is the Unix shar archive, which combined a number of text files into a shell script that recreated their original content after being executed. It is possible to archive both data and executable files with self-extracting archives. It must be distinguished from executable compression, where the executable file only contains a single executable, and running the file does not result in the uncompressed file being stored on disk but in its code being executed in memory after decompression.

Advantages Archiving files rather than sending them separately allows several related files to be combined into a single resource. It reduces the size of files that aren't already efficiently compressed (most compression algorithms cannot reduce the size of already compressed files. Compression usually reduces the size of plain text documents, but rarely affects JPEGs or word processor documents, as many modern word processors already involve a certain level of compression). Self-extracting archives can also be used by users without the necessary programs for extracting their contents, as long as they run a compatible operating system. A self-extracting archive may still be more convenient for users who do have archive management software. As long as the underlying compression algorithm and format allow it, self-extracting archives can also be encrypted for security. In many cases, the file and directory names are not included in the encryption and can be viewed by anyone without a key or password. If a person can guess part of the contents of the files from their names or context alone, an attacker may be able to break the encryption on the entire archive with a short amount of computing power and time.

… excerpt ends here. Continue reading the full article.

Illustrations

Self-extracting archive: A self-extracting archive created using 7-Zip
A self-extracting archive created using 7-Zip

Worked examples

Example 1 — a first encounter with Self-extracting archive

Start with the simplest possible case. Write down what Self-extracting archive claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Self-extracting archive before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Self-extracting archive ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Self-extracting archive

In research
Self-extracting archive appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Self-extracting archive in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Self-extracting archive is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data compression, so understanding it makes those chapters shorter.
In everyday life
Look for Self-extracting archive outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Self-extracting archive” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Self-extracting archive in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Self-extracting archive means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Self-extracting archive out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Self-extracting archive in simple terms?

A self-extracting archive (SFX or SEA) is a computer executable program which combines compressed data in an archive file with machine-executable code to extract the information. Running on a compatible operating system, it does not need a suitable extractor in the target computer to extract the da…

Why does Self-extracting archive matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Self-extracting archive?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Self-extracting archive.

Tags

  • Data compression

Keep exploring