GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing en.wikipedia.org — XZ Utils - Wikipedia
XZ Utils (previously LZMA Utils) is a set of free-software command-line lossless data compressors, including the programs FeaturesXZ Utils can compress and decompress the xz and lzma file formats. Since the LZMA format has been considered legacy,[2] XZ Utils by default compresses to xz. In addition, decompression of the .lz format used by lzip is supported since version 5.3.4.[3] In most cases, xz achieves higher compression rates than alternatives like zip,[4] gzip, and bzip2. Decompression speed is higher than bzip2, but lower than gzip. Compression can be much slower than gzip, and is slower than bzip2 for high levels of compression, and is most useful when a compressed file will be used many times.[5][6] XZ Utils consists of two major components:
Various command shortcuts exist, such as UsageBoth the behavior of the software and the properties of the file format have been designed to work similarly to those of the popular Unix compressing tools gzip and bzip2. Just like gzip and bzip, xz and lzma can only compress single files (or data streams) as input. They cannot bundle multiple files into a single archive – to do this an archiving program is used first, such as tar. Compressing an archive: xz my_archive.tar # results in my_archive.tar.xz lzma my_archive.tar # results in my_archive.tar.lzma Decompressing the archive: unxz my_archive.tar.xz # results in my_archive.tar unlzma my_archive.tar.lzma # results in my_archive.tar Version 1.22 or greater of the GNU implementation of tar has transparent support for tarballs compressed with lzma and xz, using the switches Creating an archive and compressing it: tar -c --xz -f my_archive.tar.xz /some_directory # results in my_archive.tar.xz tar -c --lzma -f my_archive.tar.lzma /some_directory # results in my_archive.tar.lzma Decompressing the archive and extracting its contents: tar -x --xz -f my_archive.tar.xz # results in /some_directory tar -x --lzma -f my_archive.tar.lzma # results in /some_directory Single-letter tar example for archive with compress and decompress with extract using short suffix: tar cJf keep.txz keep # archive then compress the directory ./keep/ into the file ./keep.txz tar xJf keep.txz # decompress then extract the file ./keep.txz creating the directory ./keep/ xz has supported multi-threaded compression (with the File format
An xz file is a sequence of one or more streams. There may be null bytes (padding) after each stream. The xz format improves on lzma by allowing for preprocessing filters (BCJ and delta). The exact filters used are similar to those used in 7z, as 7z's filters are available in the public domain via the LZMA SDK. xz's RISC-V BCJ filter is its own addition. Meta research from 2016 shows that xz has the highest compression ratio among lz4, zstd, and zlib, and the slowest compression/decompression.[8] The author of lzip claims that the xz format is inadequate for general use due to its complexity and extensibility, saying that it puts xz-compressed data at an increased risk of undetected corruption.[9] It is little-endian.[10] Stream structure
Block structure
Index structure
Variable-length integerValues from 0 to 127 are stored as-is, in one byte. Values greater than 127 (and up to 263) are stored in two or more bytes (up to 9). All bytes except the last one have the most significant bit set.[11] The following Python code implements functions to encode and decode a variable-length integer. def encode(num): if num >= 2**63: raise ValueError("num must not have more than 63 bits") buf = b"" while num >= 0x80: buf += (0x80 | (num & 0x7f)).to_bytes(length=1) num >>= 7 buf += num.to_bytes(length=1) return buf def decode(buf): if len(buf) == 0: raise ValueError("buf must not be empty") num = 0 for i, byte in enumerate(buf): if i > 8: raise ValueError("num must not have more than 63 bits") num |= (byte & 0x7f) << (i * 7) if byte & 0x80 == 0: return num Development and adoptionDevelopment of XZ Utils took place within the Tukaani Project, a small group of developers who once maintained a Linux distribution based on Slackware. The chosen name "XZ" is not an abbreviation but instead appears to be a random given name for the data compressors, as there is no mention anywhere in the official specification on the meaning of "XZ".[12] The .xz file format specification version 1.0.0 was officially released in January 2009.[13] All of the source code for xz and liblzma has been released into the public domain. The XZ Utils source distribution additionally includes some optional scripts and an example program that are subject to various versions of the GNU General Public License (GPL).[1] The resulting software xz and liblzma binaries are public domain, unless the optional LGPL getopt implementation is incorporated.[14] Binaries are available for FreeBSD, NetBSD, Linux systems, Microsoft Windows, and FreeDOS. A number of Linux distributions, including Fedora, Slackware, Ubuntu, and Debian use xz for compressing their software packages. Arch Linux previously used xz to compress packages,[15] but as of 27 December 2019, packages are compressed with Zstandard compression.[16] Fedora Linux also switched to compressing its RPM packages with Zstandard with Fedora Linux 31.[17] The GNU FTP archive also uses xz. Backdoor incidentMain article: XZ Utils backdoor
On 29 March 2024, Andres Freund, a PostgreSQL developer working at Microsoft, announced that he had found a backdoor in XZ Utils, impacting versions 5.6.0 and 5.6.1. Malicious code for setting up the backdoor had been hidden in compressed test files, and the configure script in the tar files was modified to trigger the hidden code. Freund started his investigation "after observing a few odd symptoms around liblzma (part of the xz package)", specifically that ssh logins using References
External linksRetrieved from "https://en.wikipedia.org/w/index.php?title=XZ_Utils&oldid=1381159487" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||