XZ Utils
XZ Utils (previously LZMA Utils) is a set of free-software command-line lossless data compressors, including the programs lzma and xz , for Unix-like operating systems and, from version 5.0 onwards, Microsoft Windows. For compression/decompression the Lempel–Ziv–Markov chain algorithm (LZMA) is used. XZ Utils started as a Unix port of Igor Pavlov's LZMA-SDK that has been adapted to fit seamlessly into Unix environments and their usual structure and behavior. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
XZ Utils (previously LZMA Utils) is a set of free-software command-line lossless data compressors, including the programs lzma and xz , for Unix-like operating systems and, from version 5.0 onwards, Microsoft Windows. For compression/decompression the Lempel–Ziv–Markov chain algorithm (LZMA) is used. XZ Utils started as a Unix port of Igor Pavlov's LZMA-SDK that has been adapted to fit seamlessly into Unix environments and their usual structure and behavior. 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 or for xz compression, and for LZMA compression. 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 flag) since 2014, version 5.2.0; since version 5.4.0, threaded decompression has been implemented. Threaded decompression requires multiple compressed blocks within a stream which are created by the threaded compression interface. The number of threads can be less than defined if the file is not big enough for threading with the given settings or if using more threads would exceed the memory-usage limit. 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)
Cite this
"XZ Utils". 1788051932. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1372062763 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy