Packing program

from Wikipedia, the free encyclopedia

Archiving or packing programs ( Packer for short, Archiver for short ) combine one or more other files into container files - so-called archive files - or extract them from them again. In the past, they were often used to archive data backups on magnetic tapes (the filename extension .tar , for example, is derived from the English tape archiver ).

functionality

In the simplest case, the files to be archived are simply appended one behind the other as a data stream by a packing program and the names , lengths (and possibly the order) of the individual files are also recorded in the index of the archive file. In most cases, however, additional meta information can also be saved, such as B. Creation dates, access rights and file attributes , such as the archive bit . These can u. If requested by the user, they can also be modified during packing (e.g. resetting the archive bit after successful archiving).

Even if archiving is in the foreground, the data is usually also compressed in order to save storage space. Therefore, the term packing program is often used when actually referring to a data compression program. Pure packing programs such as tar are also often used for data compression in order to combine several files into one beforehand ( progressive compression ) for data compression programs such as gzip or bzip2 , which only handle individual files .

File application

In addition to explicit packing programs and file managers that support packing programs, some application programs use the same or similar built-in algorithms for their data and settings. Others decompress data provided (and mostly read-only data) during runtime. For example, some programs want the free file for assigning IP addresses to countries to be GeoIP.dat.gzalready unpacked in the data directory, while others use the compressed version directly.

In addition, there are compression programs for program files (* .exe, * .dll etc.) that keep the programs running, such as UPX . Depending on the system, the programs are only extracted in memory or a local temporary file is created. Partly it is about saving disk space, which was relevant in the times of floppy drives and is still relevant today, especially for small computers such as embedded systems . Otherwise today it can bring a speed advantage when starting programs from slow data carriers or directly over the network, where the computing time for decompressing is less important than the data transfer rate. In addition, the program files are protected against simple disassembling attempts. Packers that use password protection when decompressing outside of the runtime or that have built-in cryptographic encryption protect more effectively against analysis, reverse engineering and modifications.

Program development

So-called archivers are also used in the area of program development. There, an archiver combines many object files in an archive (also called a library ). Instead of the individual object files, the linker only needs to be given the name of the archive, from which it then picks out the necessary object files in order to integrate them into the target file.

An example of Archiverprogramme in the latter sense of are ar65 archiver of C - compiler cc65 or under Unix packer used operating systems ar , which is used, inter alia, now mainly way.

See also