Misplaced Pages

GZ

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

u s t a r \040 \040 \0  (for old GNU tar format)

#305694

50-418: GZ or gz may refer to: .gz, the file extension for gzip files (GNU zip, an open source file compression program) GZ, an HCPCS Level II modifier meaning an item or service is expected to be denied as not reasonable or necessary GZ, the "righting moment" or "righting arm" acting to restore a tilting ship to vertical; see metacentric height Galaxy Zoo ,

100-443: A 2014 video game Topics referred to by the same term [REDACTED] This disambiguation page lists articles associated with the title GZ . If an internal link led you here, you may wish to change the link to point directly to the intended article. Retrieved from " https://en.wikipedia.org/w/index.php?title=GZ&oldid=1234679634 " Category : Disambiguation pages Hidden categories: Short description

150-469: A crowdsourced astronomy project Gaza Strip (FIPS PUB 10-4 territory code) Gestrichener Zellstoffkarton (German; DIN 19303 Code), a grade of paperboard also known as solid bleached board Ground Zero , in military parlance Guangzhou , capital and largest city of Guangdong Province in southeastern China Guizhou , a province of China (Guobiao abbreviation GZ) Air Rarotonga (IATA airline designator) Metal Gear Solid V: Ground Zeroes ,

200-403: A gzip replacement. It produces considerably smaller files (especially for source code and other structured text), but at the cost of memory and processing time (up to a factor of 4). AdvanceCOMP, Zopfli , libdeflate and 7-Zip can produce gzip-compatible files, using an internal DEFLATE implementation with better compression ratios than gzip itself—at the cost of more processor time compared to

250-566: A new empty directory and extract the archive into it—or avoid the tar file entirely. Most graphical tools can display the contents of the archive before extracting them. Vim can open tar archives and display their contents. GNU Emacs is also able to open a tar archive and display its contents in a dired buffer. The tar format was designed without a centralized index or table of content for files and their properties for streaming to tape backup devices. The archive must be read sequentially to list or extract files. For large tar archives, this causes

300-402: A performance penalty, making tar archives unsuitable for situations that often require random access to individual files. With a well-formed tar file stored on a seekable (i.e. allows efficient random reads) medium, the tar program can still relatively quickly (in linear time relative to file count) look for a file by skipping file reads according to the "size" field in the file headers. This

350-416: A specified date. Basic options: Create an archive file archive.tar from the file README.txt and directory src : Extract contents for the archive.tar into the current directory: Create an archive file archive.tar.gz from the file README.txt and directory src and compress it with gzip  : Extract contents for the archive.tar.gz into the current directory: A tarpipe

400-406: A user has only a very old tar available, which does not feature those security measures, these problems can be mitigated by first examining a tar file using the command tar tf archive.tar , which lists the contents and allows to exclude problematic files afterwards. These commands do not extract any files, but display the names of all files in the archive. If any are problematic, the user can create

450-629: Is a computer software utility for collecting many files into one archive file , often referred to as a tarball , for distribution or backup purposes. The name is derived from "tape archive", as it was originally developed to write data to sequential I/O devices with no file system of their own, such as devices that use magnetic tape . The archive data sets created by tar contain various file system parameters, such as name, timestamps, ownership, file-access permissions, and directory organization. POSIX abandoned tar in favor of pax , yet tar sees continued widespread use. The command-line utility

500-405: Is compatible with gzip and speeds up compression by using all available CPU cores and threads. Data in blocks prior to the first damaged part of the archive is usually fully readable. Data from blocks not demolished by damage that are located afterward may be recoverable through difficult workarounds. The tar utility included in most Linux distributions can extract .tar.gz files by passing

550-448: Is designed so that all implementations able to read the UStar format will be able to read the pax format as well. The only exceptions are files that make use of extended features, such as longer file names. For compatibility, these are encoded in the tar files as special x or g type files, typically under a PaxHeaders.XXXX directory. A pax-supporting implementation would make use of

SECTION 10

#1733092490306

600-412: Is different from Wikidata All article disambiguation pages All disambiguation pages Gzip gzip is a file format and a software application used for file compression and decompression . The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and intended for use by GNU (from which

650-482: Is in use. The UStar format allows for longer file names and stores additional information about each file. The maximum filename size is 256, but it is split among a preceding path "filename prefix" and the filename itself, so can be much less. The type flag field can have the following values: POSIX.1-1988 vendor specific extensions using link flag values 'A'–'Z' partially have a different meaning with different vendors and thus are seen as outdated and replaced by

700-509: Is known as extended tar format or pax format. The new tar format allows users to add any type of vendor-tagged vendor-specific enhancements. The following tags are defined by the POSIX standard: In 2001, the Star program became the first tar to support the new format. In 2004, GNU tar supported the new format, though it does not write it as its default output from the tar program yet. The pax format

750-448: Is less compact than compressed tarballs holding the same data, because it compresses files individually and cannot take advantage of redundancy between files ( solid compression ). The gzip file format is also not to be confused with that of the compress utility, based on LZW, with extension .Z ; however, the gunzip utility is able to decompress .Z files. Various implementations of the program have been written. The most commonly known

800-512: Is normally used to compress just single files. Compressed archives are typically created by assembling collections of files into a single tar archive (also called tarball ), and then compressing that archive with gzip. The final compressed file usually has the extension .tar.gz or .tgz . gzip is not to be confused with the ZIP archive format, which also uses DEFLATE . The ZIP format can hold collections of files without an external archiver, but

850-455: Is older versions of GNU tar, when running on the MASSCOMP RTU (Real Time Unix) operating system, which supported an O_CTG flag to the open() function to request a contiguous file; however, that support was removed from GNU tar version 1.24 onwards. In 1997, Sun proposed a method for adding extensions to the tar format. This method was later accepted for the POSIX.1-2001 standard. This format

900-464: Is preceded by a 512-byte header record. The file data is written unaltered except that its length is rounded up to a multiple of 512 bytes. The original tar implementation did not care about the contents of the padding bytes, and left the buffer data unaltered, but most modern tar implementations fill the extra space with zeros. The end of an archive is marked by at least two consecutive zero-filled records. (The origin of tar's record size appears to be

950-589: Is the GNU Project's implementation using Lempel-Ziv coding (LZ77). OpenBSD 's version of gzip is actually the compress program, to which support for the gzip format was added in OpenBSD 3.4. The 'g' in this specific version stands for gratis . FreeBSD , DragonFly BSD and NetBSD use a BSD-licensed implementation instead of the GNU version; it is actually a command-line interface for zlib intended to be compatible with

1000-404: Is the basis for option -n in GNU tar. When a tar file is compressed whole, the compression format, being usually non-seekable, prevents this optimization from being done. A number of "indexed" compressors, which are aware of the tar format, can restore this feature for compressed files. To maintain seekability, tar files must be also concatenated properly, by removing the trailing zero block at

1050-579: Is the method of creating an archive on the standard output file of the tar utility and piping it to another tar process on its standard input , working in another directory, where it is unpacked. This process copies an entire source directory tree including all special files, for example: The tar format continues to be used extensively for open-source software distribution . *NIX-distributions use it in various source- and binary-package distribution mechanisms, with most software source code made available in compressed tar archives. The original tar format

SECTION 20

#1733092490306

1100-553: Is the number of blocks per record. The default is 20, producing 10  KiB records. There are multiple tar file formats, including historical and current ones. Two tar formats are codified in POSIX: ustar and pax . Not codified but still in current use is the GNU tar format. A tar archive consists of a series of file objects, hence the popular term tarball , referencing how a tarball collects objects of all kinds that stick to its surface. Each file object includes any file data, and

1150-522: The z option, e.g., tar -zxf file.tar.gz , where -z instructs decompression, -x means extraction, and -f specifies the name of the compressed archive file to extract from. Optionally, -v ( verbose ) lists files as they are being extracted. zlib is an abstraction of the DEFLATE algorithm in library form which includes support both for the gzip file format and a lightweight data stream format in its API. The zlib stream format, DEFLATE, and

1200-533: The "g" of gzip is derived). Version 0.1 was first publicly released on 31 October 1992, and version 1.0 followed in February 1993. The decompression of the gzip format can be implemented as a streaming algorithm , an important feature for Web protocols , data interchange and ETL (in standard pipes ) applications. gzip is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding . DEFLATE

1250-480: The 100 characters are stored in @LongLink entries that would be seen as ordinary files by TAR utilities unaware of this feature. Similarly, the PAX format uses PaxHeaders entries. Many older tar implementations do not record nor restore extended attributes (xattrs) or access-control lists (ACLs). In 2001, Star introduced support for ACLs and extended attributes, through its own tags for POSIX.1-2001 pax. bsdtar uses

1300-526: The 512-byte disk sectors used in the Version 7 Unix file system.) The final block of an archive is padded out to full length with zeros. The file header record contains metadata about a file. To ensure portability across different architectures with different byte orderings , the information in the header record is encoded in ASCII . Thus if all the files in an archive are ASCII text files, and have ASCII names, then

1350-477: The GNU implementations' options. These implementations originally come from NetBSD , and support decompression of bzip2 and the Unix pack format. An alternative compression program achieving 3-8% better compression is Zopfli . It achieves gzip-compatible compression using more exhaustive algorithms, at the expense of compression time required. It does not affect decompression time. pigz , written by Mark Adler,

1400-410: The POSIX.1-2001 extensions that also include a vendor tag. Type '7' (Contiguous file) is formally marked as reserved in the POSIX standard, but was meant to indicate files which ought to be contiguously allocated on disk. Few operating systems support creating such files explicitly, and hence most TAR programs do not support them, and will treat type 7 files as if they were type 0 (regular). An exception

1450-411: The archive is essentially an ASCII text file (containing many NUL characters ). The fields defined by the original Unix tar format are listed in the table below. The link indicator/file type table includes some modern extensions. When a field is unused it is filled with NUL bytes. The header uses 257 bytes, then is padded with NUL bytes to make it fill a 512 byte record. There is no "magic number" in

1500-436: The checksum both ways, and treat it as good if either the signed or unsigned sum matches the included checksum. Unix filesystems support multiple links (names) for the same file. If several such files appear in a tar archive, only the first one is archived as a normal file; the rest are archived as hard links, with the "name of linked file" field set to the first one's name. On extraction, such hard links should be recreated in

1550-508: The end of each file. Another issue with tar format is that it allows several (possibly different) files in archive to have identical paths and filenames. When extracting such archive, usually the latter version of a file overwrites the former. This can create a non-explicit (unobvious) tarbomb, which technically does not contain files with absolute paths or referring to parent directories, but still causes overwriting files outside current directory (for example, archive may contain two files with

GZ - Misplaced Pages Continue

1600-401: The file size, only 11 octal digits can be stored. This gives a maximum file size of 8 gigabytes on archived files. To overcome this limitation, in 2001 star introduced a base-256 coding that is indicated by setting the high-order bit of the leftmost byte of a numeric field. GNU-tar and BSD-tar followed this idea. Additionally, versions of tar from before the first POSIX standard from 1988 pad

1650-404: The file suffix .tar (e.g. somefile.tar ). A tar archive file contains uncompressed byte streams of the files which it contains. To achieve archive compression, a variety of compression programs are available, such as gzip , bzip2 , xz , lzip , lzma , zstd , or compress , which compress the entire tar archive. Typically, the compressed form of the archive receives a filename by appending

1700-469: The file system. Most modern tar programs read and write archives in the UStar ( Unix Standard TAR ) format, introduced by the POSIX IEEE P1003.1 standard from 1988. It introduced additional header fields. Older tar programs will ignore the extra information (possibly extracting partially named files), while newer programs will test for the presence of the "ustar" string to determine if the new format

1750-544: The form of headers and trailers. Still, the gzip format is sometimes recommended over zlib because Internet Explorer does not implement the standard correctly and cannot handle the zlib format as specified in RFC 1950. zlib DEFLATE is used internally by the Portable Network Graphics (PNG) format. Since the late 1990s, bzip2 , a file compression utility based on a block-sorting algorithm, has gained some popularity as

1800-564: The gzip file format were standardized respectively as RFC 1950, RFC 1951, and RFC 1952. The gzip format is used in HTTP compression , a technique used to speed up the sending of HTML and other content on the World Wide Web . It is one of the three standard formats for HTTP compression as specified in RFC 2616. This RFC also specifies a zlib format (called "DEFLATE"), which is equal to the gzip format except that gzip adds eleven bytes of overhead in

1850-488: The header, for file identification. Pre-POSIX.1-1988 (i.e. v7) tar header: The pre-POSIX.1-1988 Link indicator field can have the following values: Some pre-POSIX.1-1988 tar implementations indicated a directory by having a trailing slash (/) in the name. Numeric values are encoded in octal numbers using ASCII digits, with leading zeroes. For historical reasons, a final NUL or space character should also be used. Thus although there are 12 bytes reserved for storing

1900-421: The implementations below). The history of tar is a story of incompatibilities, known as the "tar wars". Most tar implementations can also read and create cpio and pax (the latter actually is a tar -format with POSIX -2001-extensions). Key implementations in order of origin: Additionally, most pax and cpio implementations can read and create multiple types of tar files. tar archive files usually have

1950-410: The information, while non-supporting ones like 7-Zip would process them as additional files. Besides creating and extracting archives, the functionality of the various archival utilities varies. For example, implementations might automatically detect the format of compressed TAR archives for extraction so the user does not have to specify it, and let the user limit adding files to those modified after

2000-531: The reference implementation. Research published in 2023 showed that simple lossless compression techniques such as gzip could be combined with a k-nearest-neighbor classifier to create an attractive alternative to deep neural networks for text classification in natural language processing . This approach has been shown to equal and in some cases outperform conventional approaches such as BERT due to low resource requirements, e.g. no requirement for GPU hardware. Tar (file format) In computing , tar

2050-402: The same path and filename, first of which is a symlink to some location outside current directory, and second of which is a regular file; then extracting such archive on some tar implementations may cause writing to the location pointed to by the symlink). Historically, many systems have implemented tar, and many general file archivers have at least partial support for tar (often using one of

GZ - Misplaced Pages Continue

2100-409: The star extensions to support ACLs. More recent versions of GNU tar support Linux extended attributes, reimplementing star extensions. A number of extensions are reviewed in the filetype manual for BSD tar, tar(5). A tarbomb , in hacker slang , is a tar file that contains many files that extract into the working directory. Such a tar file can create problems by overwriting files of the same name in

2150-410: The tape between blocks (for the tape to physically start and stop moving). Some tape drives (and raw disks) support only fixed-length data blocks. Also, when writing to any medium such as a file system or network, it takes less time to write one large block than many small blocks. Therefore, the tar command writes data in records of many 512  B blocks. The user can specify a blocking factor, which

2200-747: The tar command was indicated for withdrawal in favor of pax command at least since 1994. Today, Unix-like operating systems usually include tools to support tar files, as well as utilities commonly used to compress them, such as xz , gzip , and bzip2 . The tar command has also been ported to the IBM i operating system. BSD-tar has been included in Microsoft Windows since Windows 10 April 2018 Update , and there are otherwise multiple third party tools available to read and write these formats on Windows. Many historic tape drives read and write variable-length data blocks , leaving significant wasted space on

2250-473: The values with spaces instead of zeroes. The checksum is calculated by taking the sum of the unsigned byte values of the header record with the eight checksum bytes taken to be ASCII spaces (decimal value 32). It is stored as a six digit octal number with leading zeroes followed by a NUL and then a space. Various implementations do not adhere to this format. In addition, some historic tar implementations treated bytes as signed. Implementations typically calculate

2300-508: The working directory and, like a tarbomb, have the potential to overwrite existing files. However, modern versions of FreeBSD and GNU tar do not create or extract absolute paths and parent-directory references by default, unless it is explicitly allowed with the flag -P or the option --absolute-names . The bsdtar program, which is also available on many operating systems and is the default tar utility on Mac OS X v10.6, also does not follow parent-directory references or symbolic links. If

2350-491: The working directory, or mixing one project's files into another. It is at best an inconvenience to the user, who is obliged to identify and delete a number of files interspersed with the directory's other contents. Such behavior is considered bad etiquette on the part of the archive's creator. A related problem is the use of absolute paths or parent directory references when creating tar files. Files extracted from such archives will often be created in unusual locations outside

2400-451: Was created in the early days of Unix, and despite current widespread use, many of its design features are considered dated. Other formats have been created to address the shortcomings of tar. Due to the field size , the original TAR format was unable to store file paths and names in excess of 100 characters. To overcome this problem while maintaining readability by existing TAR utilities , GNU tar stores file paths and names in excess of

2450-556: Was first introduced in the Version 7 Unix in January 1979, replacing the tp program (which in turn replaced "tap"). The file structure to store this information was standardized in POSIX .1-1988 and later POSIX.1-2001, and became a format supported by most modern file archiving systems. The tar command was abandoned in POSIX.1-2001 in favor of pax command, which was to support ustar file format;

2500-452: Was intended as a replacement for LZW and other patent -encumbered data compression algorithms which, at the time, limited the usability of the compress utility and other popular archivers. "gzip" is often also used to refer to the gzip file format, which is: Although its file format also allows for multiple such streams to be concatenated (gzipped files are simply decompressed concatenated as if they were originally one file), gzip

#305694