Share to: share facebook share twitter share wa share telegram print page

XZ Utils

XZ Utils
Original author(s)Lasse Collin
Developer(s)The Tukaani Project
Stable release
5.6.2 / May 29, 2024; 3 months ago (2024-05-29)
Repository
Written inC
Operating systemCross-platform
TypeData compression
License
Websitetukaani.org/xz/
.xz
Filename extension
.xz
Internet media type
application/x-xz
Magic numberFD 37 7A 58 5A 00
Developed byLasse Collin
Igor Pavlov
Initial releaseJanuary 14, 2009; 15 years ago (2009-01-14)
Latest release
1.2.1
April 8, 2024; 5 months ago (2024-04-08)
Type of formatData compression
Open format?Yes
Free format?Yes
Websitetukaani.org/xz/format.html

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.

Features

XZ 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 most cases, xz achieves higher compression rates than alternatives like zip,[3] 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.[4][5]

XZ Utils consists of two major components:

Various command shortcuts exist, such as lzma (for xz --format=lzma), unxz (for xz --decompress; analogous to gunzip) and xzcat (for unxz --stdout; analogous to zcat).

Usage

Both 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 --xz or -J for xz compression, and --lzma 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 -T flag)[6] since 2014, version 5.2.0;[7] 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.[6]

The xz format

The xz format improves on lzma by allowing for preprocessing filters. 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.

Development and adoption

Development of XZ Utils took place within the Tukaani Project, a small group of developers who once maintained a Linux distribution based on Slackware. The .xz file format specification version 1.0.0 was officially released in January 2009.[8]

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.[9]

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,[10] but as of December 27, 2019, packages are compressed with Zstandard compression.[11] Fedora Linux also switched to compressing its RPM packages with Zstandard with Fedora Linux 31.[12] The GNU FTP archive also uses xz.

Backdoor incident

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. Compressed test files had been added to the code for setting up the backdoor via additions to the configure script in the tar files. He started his investigation because "After observing a few odd symptoms around liblzma (part of the xz package)" as he found that ssh logins using sshd were "taking a lot of CPU, valgrind errors".[13] The vulnerability received a Common Vulnerability Scoring System (CVSS) score of 10 (the highest).[14]

References

  1. ^ a b Licensing on tukaani.org "The most interesting parts of XZ Utils (e.g. liblzma) are in the public domain. You can do whatever you want with the public domain parts. Some parts of XZ Utils (e.g. build system and some utilities) are under different free software licenses such as GNU LGPLv2.1, GNU GPLv2, or GNU GPLv3."
  2. ^ LZMA Util, retrieved 2011-01-25
  3. ^ Vivek, Gite. "How to compress the whole directory using xz and tar in Linux". For instance, I compressed a directory having 37M size using both xz and zip. The zip file size was 31M, while the xz file was 16M after compression
  4. ^ Henry-Stocker, Sandra (2017-12-12). "How to squeeze the most out of Linux file compression". Network World. Retrieved 2020-02-09.
  5. ^ "Gzip vs Bzip2 vs XZ Performance Comparison". RootUsers. 2015-09-16. Retrieved 2020-02-09.
  6. ^ a b "xz, unxz, xzcat, lzma, unlzma, lzcat – Compress or decompress .xz and .lzma files". Linux Manpages Online.
  7. ^ "XZ Utils Release Notes". git.tukaani.org.
  8. ^ Lasse Collin (2009-01-28). "News: The .xz file format specification version 1.0.0 is now officially released".
  9. ^ "In what cases is the output of a GPL program covered by the GPL too?". GNU.org. Retrieved 21 August 2019.
  10. ^ Pierre Schmitz (2010-03-23). "News: Switching to xz compression for new packages".
  11. ^ "Arch Linux - News: Now using Zstandard instead of xz for package compression". www.archlinux.org. Retrieved 2020-01-07.
  12. ^ Mach, Daniel. "Changes/Switch RPMs to zstd compression". Fedora Project Wiki. Retrieved 30 March 2024.
  13. ^ "oss-security - backdoor in upstream xz/liblzma leading to ssh server compromise". www.openwall.com. Retrieved 2024-04-08.
  14. ^ "A backdoor in xz". LWN.net. Retrieved 2024-03-30.

Read other articles:

Bekasi beralih ke halaman ini. Untuk kegunaan lain, lihat Bekasi (disambiguasi). Kabupaten BekasiKabupatenTranskripsi bahasa daerah • Aksara SundaᮘᮨᮊᮞᮤKantor Bupati Kabupaten Bekasi LambangJulukan: Daerah IndustriMotto: Swatantra wibawa mukti(Sunda) Otonom, berwibawa, dan makmurHimne daerah: Himne Kabupaten Bekasi PetaKabupaten BekasiPetaTampilkan peta Jawa BaratKabupaten BekasiKabupaten Bekasi (Jawa)Tampilkan peta JawaKabupaten BekasiKabupaten Bekasi (Ind...

Всего 165-я стрелковая дивизия формировалась 5 раз. См. список других формирований 165-я стрелковая Седлецкая Краснознамённая ордена Кутузова дивизия (165 сд) Вооружённые силы ВС СССР Вид вооружённых сил сухопутные Род войск (сил) пехота Почётные наименования «Седлецкая» Форм

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أبريل 2016) سي.بي.إم   معلومات عامة الموقع الرسمي الموقع الرسمي  تعديل مصدري - تعديل   سي.بي.إم قناة تلفزيونية بريطانية مملوكة من قبل شركة شرق مدلند، سي.بي.إم وسائط ا

Wappen Deutschlandkarte 51.473810.7417213Koordinaten: 51° 28′ N, 10° 45′ O Basisdaten Bundesland: Thüringen Landkreis: Nordhausen Höhe: 213 m ü. NHN Fläche: 61,8 km2 Einwohner: 3050 (31. Dez. 2022)[1] Bevölkerungsdichte: 49 Einwohner je km2 Postleitzahl: 99735 Vorwahlen: 03631, 036332, 036335, 036337 Kfz-Kennzeichen: NDH Gemeindeschlüssel: 16 0 62 063 LOCODE: DE WXW Gemeindegliederung: 8 Ortsteile Adresse...

присілок Петровка рос. Петровкаерз. Петровка Країна  Росія Суб'єкт Російської Федерації Мордовія Муніципальний район Єльниківський район Поселення Новодівиченське Код ЗКАТУ: 89218860003 Код ЗКТМО: 89618460111 Основні дані Населення 14 осіб (2010[1]) Поштовий індекс 431387 Географ...

Esta é a lista de deputados do Império do Brasil da 2.ª legislatura do Congresso Nacional. Inclui-se o nome civil dos parlamentares, o partido ao qual eram filiados na data da posse e a quantidade de votos que receberam para sua eleição, sua unidade federativa de origem, bem como outras informações. Esta legislatura da Câmara dos Deputados durou de 1830 a 1833, nos termos da Constituição Imperial de 1824. Precedido por1ª legislatura 2ª Legislatura da Câmara dos Deputados1830

المعركة الأخيرة (بالإنجليزية: The Last Battle)‏    المؤلف سي. إس. لويس  اللغة إنجليزية بريطانية،  والإنجليزية  تاريخ النشر 4 سبتمبر 1956  السلسلة سجلات نارنيا  النوع الأدبي أدب الأطفال[1]،  وفنتازيا،  وفنتازيا عليا  مستوحاة من رؤيا يوحنا  المواقع OCLC 695596...

Analisa beralih ke halaman ini. Untuk surat kabar, lihat Analisa (surat kabar). Adriaen van Ostade, Analisis (1666) Analisis adalah mengamati aktivitas objek dengan cara mendeskripsikan komposisi objek dan menyusun kembali komponen-komponennya untuk dikaji atau dipelajari secara detail.[1] Kata analisis berasal dari bahasa Yunani Kuno ἀνάλυσις (analysis, memecahkan atau menguraikan dari ana- naik, menyeluruh dan lysis melonggarkan).[2] Dalam bidang matematika, logika,...

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أبريل 2020) شعار وكالة حماية البيئة. في الولايات المتحدة، يمكن أن يشير مصطلح مستوى العمل[1] (بالإنجليزية: action level)، إلى المستويات التي أوصت بها وكالة حماية البيئة لتطب...

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (يوليو 2019) ديك كلاينر معلومات شخصية الميلاد 9 مارس 1921  نيويورك  تاريخ الوفاة 13 فبراير 2002 (80 سنة)   مواطنة الولايات المتحدة  الحياة العملية المهنة صحفي  تعديل ...

经济、社会和文化权利国际公约A公约公约缔约方和签署国:  签署和批准  签署但未批准  未签署也未批准類型联合国大会 决议起草完成日1954簽署日1966年12月16日[1]簽署地點纽约联合国总部生效日1976年1月3日[1]簽署者71締約方171保存處联合国秘书长語言法语、英语、俄语、汉语、西班牙语和阿拉伯语[2] 收錄於维基文库的條約原文: 《经...

2014 American filmBulletTeaser posterDirected byNick LyonWritten byNick Lyon Byron Lester Ron PeerProduced byRobert RodriguezMatthew JoynesStarringDanny Trejo Jonathan BanksEdited byJulio SaldarriagaMusic byBen ZaraiProductioncompaniesAmerican United Entertainment Funimation SC Films InternationalDistributed byIFA Distribution FunimationRelease date February 25, 2014 (2014-02-25) Running time87 minutesCountryUnited StatesLanguageEnglish Bullet (stylized as BULLET) is a 2014 act...

Ancient Persian royal dynasty This article is about the Persians. For their Greek enemies, see Alcmaeonids. House of Achaemenes

Friedrich-List-Medaille in Gold Die Friedrich-List-Medaille ist eine Ehrenmedaille des Bundesverbands Deutscher Volks- und Betriebswirte (bdvb). Sie wird an Personen verliehen, die sich um die satzungsmäßigen Ziele des bdvb besondere Verdienste erworben haben. Die Medaille erinnert an den bedeutenden deutschen Wirtschaftstheoretiker Friedrich List (1789–1846). Geschichte Die Stiftung der Friedrich-List-Medaille geht auf das 60. Gründungsjubiläum des Reichsverbands Deutscher Volkswirte, ...

Village in Montana Province, BulgariaBeli Brod Бели бродVillageCountry BulgariaProvinceMontana ProvinceMunicipalityBoychinovtsiTime zoneUTC+2 (EET) • Summer (DST)UTC+3 (EEST) Beli Brod is a village in Boychinovtsi Municipality, Montana Province, north-western Bulgaria.[1] References ^ Guide Bulgaria, Accessed Jan 11, 2015 vte Boychinovtsi MunicipalityCapital: BoychinovtsiVillages Beli Breg Beli Brod Erden Gromshin Kobilyak Lehchevo Madan Marchevo Ohrid Palilul...

This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (October 2018) (Learn how and when to remove this template message) This list is incomplete; you can help by adding missing items. (August 2008) Hindi cinema 1920s 1920 1921 1922 1923 19241925 1926 1927 1928 1929 1930s 1930 1931 1932 1933 19341935 1936 1937 1938 1939 1940s 1940 1941 1942 1943 19441945 1946 1947 1...

Club Náutico de Altea GrímpolaDatos generalesAcrónimo CNADeporte Club náuticoFundación 1977Web oficial[editar datos en Wikidata] El Club Náutico de Altea se sitúa en el municipio de Altea, (Alicante) España. Instalaciones El club gestiona prácticamente la mitad del puerto de Altea, con 360 amarres deportivos, para una eslora máxima permitida de 30 metros, siendo su calado en bocana de 5 m. La mayorías de las plazas están destinadas a embarcaciones en tránsito, por lo qu...

Dutch rower Lex MullinkMullink (front) with his Olympic teammates Jan, Freek and Bobbie van de Graaff in 1964Personal informationBorn (1944-12-19) 19 December 1944 (age 78)Almelo, NetherlandsHeight1.89 m (6 ft 2 in)Weight90 kg (200 lb)SportSportRowingClubLaga, Delft Medal record Representing the  Netherlands Olympic Games 1964 Tokyo Coxed four Alex Gerhard Lex Mullink (born 19 December 1944) is a retired Dutch rower who won a bronze medal in the coxed fours ...

Regino of Prüm, Carnegie Library of Reims. Regino of Prüm or of Prum (Latin: Regino Prumiensis, German: Regino von Prüm; died 915 AD) was a Benedictine monk, who served as abbot of Prüm (892–99) and later of Saint Martin's at Trier, and chronicler, whose Chronicon is an important source for late Carolingian history. Biography According to the statements of a later era, Regino was the son of noble parents and was born at the stronghold of Altrip on the Rhine near Speyer at an unknown dat...

«The image of you»Sencillo de Anjeza ShahiniPublicación 2003Formato Disco compactoGénero(s) PopDuración 2:58Autor(es) Edmond Zhulali, Agim Doçit[editar datos en Wikidata] «The image of you» (en español: «La imagen de ti») fue la canción debut de Albania en el Festival de la Canción de Eurovisión, siendo interpretada en inglés por Anjeza Shahini en la semifinal del festival de 2004. La canción fue interpretada en 13.er lugar en la semifinal, siguiendo la canción de L...

Kembali kehalaman sebelumnya