q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Ruler of the Mali Empire in the 14th century

Mansa Musa was the ruler of the Mali Empire in West Africa. Details recorded here should be sourced; unknown information is left blank.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

XZ Utils

XZ Utils
Original authorLasse Collin
DeveloperThe Tukaani Project
Stable release
5.8.3 / 31 March 2026; 6 months ago (2026-03-31)
Written inC
Operating systemCross-platform
TypeData compression
License
Websitetukaani.org/xz/
Repository

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

[edit]

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 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 lzma (for xz --format=lzma), unxz (for xz --decompress; analogous to gunzip) and xzcat (for unxz --stdout; analogous to zcat).

Usage

[edit]

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)[7] since 2014, version 5.2.0;[3] 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.[7]

File format

[edit]
xz (file format)
Filename extension
.xz
Internet media type
application/x-xz
Magic numberFD 37 7A 58 5A 00
Developed byLasse Collin
Igor Pavlov
Initial release14 January 2009; 17 years ago (2009-01-14)
Latest release
1.2.1
8 April 2024; 2 years ago (2024-04-08)
Type of formatData compression
Open format?Yes
Free format?Yes
Websitetukaani.org/xz/format.html

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

[edit]
Offset (bytes) Field Size (bytes) Description
0 Header magic number 6 Magic number. Must be FD 37 7A 58 5A 00.
6 Flags 2 Flags. The first byte and the four most significant bits of the second byte must be zero (reserved for future use).

The type of check (last field in the block structure) is encoded in the four least significant bits of the second byte:

Value Size (bytes) Description
0 0 None
1 4 CRC-32
2 4 Reserved
3 4 Reserved
4 8 CRC-64
5 8 Reserved
6 8 Reserved
7 16 Reserved
8 16 Reserved
9 16 Reserved
10 32 SHA-256
11 32 Reserved
12 32 Reserved
13 64 Reserved
14 64 Reserved
15 64 Reserved
8 Header CRC32 4 CRC-32 of the flags field. Used to distinguish between a corrupted file and unsupported flags (i.e. non-zero reserved bit).
12 Blocks Varies Sequence of zero or more blocks.
Varies Index Varies See index below.
Varies Footer CRC32 4 CRC-32 of the flags and backward size.
Varies Backward Size 4 Size of the index field.
Varies Flags 2 Copy of the flags field above.
Varies Footer magic number 2 Magic number. Must be 59 5A.

Block structure

[edit]
Offset (bytes) Field Size (bytes) Description
0 Header size 1 Size of the header. Note: real_header_size = (encoded_header_size + 1) * 4.
1 Flags 1 Flags
  • Bits 0–1: Number of filters (1–4).
  • Bits 2–5: Must be zero.
  • Bit 6: Compressed size field is present.
  • Bit 7: Uncompressed size field is present.
2 Compressed size 0 or varies Size of the compressed data. Present if bit 6 of the flags is set. Encoded as a variable-length integer.
Varies Uncompressed size 0 or varies Size of the block after decompression. Present if bit 7 of the flags is set. Encoded as a variable-length integer.
Varies Filter flags Varies Sequence of filter flags. The amount is encoded in bits 0–1 of the flags.
Varies Header padding Varies As many null bytes as needed to make the header (i.e. fields before the compressed data) have the size specified in the header size field.
Varies CRC32 4 CRC-32 of all bytes in the block up to (not including) this field.
Varies Compressed data Varies The compressed data.
Varies Block padding 0, 1, 2 or 3 0–3 null bytes to make the size of the block a multiple of 4.
Varies Check 0, 4, 8, or 32 Error-detecting mechanism calculated from the data before compression. The type of check is encoded in the flags of the stream structure.

Index structure

[edit]
Offset (bytes) Field Size (bytes) Description
0 Index indicator 1 Must be zero to distinguish the index from a block, because this field overlaps with the first field in the block structure.
1 Number of records Varies Number of records in the next field. Must be the same as the number of blocks in the stream. Encoded as a variable-length integer.
Varies Records Varies Sequence of records. Each record contains two variable-length integers:
  • Unpadded size: size of the block excluding the padding field.
  • Uncompressed size: size in bytes of the uncompressed block.
Varies Padding 0, 1, 2 or 3 0–3 null-bytes to make the size of the index a multiple of 4.
Varies CRC32 4 CRC-32 of all bytes in the index except this field.

Variable-length integer

[edit]

Values 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 adoption

[edit]

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 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 incident

[edit]

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 sshd were "taking a lot of CPU" and producing valgrind errors.[18] The vulnerability received a Common Vulnerability Scoring System (CVSS) score of 10 (the highest).[19]

References

[edit]
  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 25 January 2011
  3. ^ a b "XZ Utils Release Notes". git.tukaani.org.
  4. ^ 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
  5. ^ Henry-Stocker, Sandra (12 December 2017). "How to squeeze the most out of Linux file compression". Network World. Archived from the original on 29 February 2020. Retrieved 9 February 2020.
  6. ^ "Gzip vs Bzip2 vs XZ Performance Comparison". RootUsers. 16 September 2015. Archived from the original on 17 February 2020. Retrieved 9 February 2020.
  7. ^ a b "xz, unxz, xzcat, lzma, unlzma, lzcat – Compress or decompress .xz and .lzma files". Linux Manpages Online. Archived from the original on 4 November 2019. Retrieved 4 November 2019.
  8. ^ "Smaller and faster data compression with Zstandard". Engineering at Meta. 31 August 2016. Retrieved 22 July 2025.
  9. ^ Diaz Diaz, Antonio (11 June 2016). "Xz format inadequate for general use". Archived from the original on 24 February 2026. Retrieved 22 March 2026.
  10. ^ "The .xz File Format". 1.2. Multibyte Integers. Archived from the original on 10 May 2023. Retrieved 8 May 2023.
  11. ^ "The .xz File Format". 1.2. Multibyte Integers. Archived from the original on 10 May 2023. Retrieved 8 May 2023.
  12. ^ "Official XZ Specification". tukaani.org. Lasse Collin. Archived from the original on 8 October 2024. Retrieved 8 October 2024.
  13. ^ Lasse Collin (28 January 2009). "News: The .xz file format specification version 1.0.0 is now officially released".
  14. ^ "In what cases is the output of a GPL program covered by the GPL too?". GNU.org. Archived from the original on 18 March 2022. Retrieved 21 August 2019.
  15. ^ Pierre Schmitz (23 March 2010). "News: Switching to xz compression for new packages". Archived from the original on 6 July 2010. Retrieved 10 February 2018.
  16. ^ "Arch Linux – News: Now using Zstandard instead of xz for package compression". www.archlinux.org. Archived from the original on 18 March 2022. Retrieved 7 January 2020.
  17. ^ Mach, Daniel. "Changes/Switch RPMs to zstd compression". Fedora Project Wiki. Archived from the original on 2 June 2019. Retrieved 30 March 2024.
  18. ^ "oss-security – backdoor in upstream xz/liblzma leading to ssh server compromise". www.openwall.com. Archived from the original on 1 April 2024. Retrieved 8 April 2024.
  19. ^ "A backdoor in xz". LWN.net. Retrieved 30 March 2024.
[edit]

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

No preview image
Wikipedia

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.

MORE →
Wikipedia

XZ Utils backdoor

On 29 March 2024, a malicious backdoor was discovered in the compression software XZ Utils. The backdoor gives an attacker who possesses a specific private key the ability to remotely execute code on an affected system through OpenSSH, a set of networking utilities. The backdoor was discovered by software developer Andres Freund. It was later discovered that the exploit was deliberately included into the software in February 2024 by a user going by the name of "Jia Tan", affecting both version 5.6.0 and 5.6.1. The issue was given the CVE exploit number CVE-2024-3094 and was assigned a CVSS score of 10.0, the highest possible score, indicating that the exploit was extremely severe. While XZ Utils is commonly present in most Linux distributions, at the time of discovery the affected versions had not yet been widely deployed to production systems, but were present in development versions of major distributions, resulting in distribution maintainers rebuilding their packages to mitigate the exploit. A patch for this backdoor was released on 29 May 2024, with version number 5.6.2. The exploit was noted for its high level of obfuscation, being the result of a campaign lasting years.

MORE →
Wikipedia

ZIM (file format)

The ZIM file format is an open file format that stores website content for offline usage. The format is defined by the openZIM project, which also supports an open-source ZIM reader called Kiwix. The format is primarily used to store the contents of Wikipedia and other Wikimedia projects, including articles, full-text search indices and auxiliary files. ZIM is an abbreviation for 'Zeno improved', as it replaced the earlier Zeno file format. Since 2021, the library defaults to Zstandard file compression, and also supports LZMA2 compression, as implemented by the XZ Utils library. Most notably, the compression ratio can be up to 3∶1 with almost all of the space savings taking place within the clusters.

MORE →
No preview image
Wikipedia

XZ

XZ, X.Z., or xz may refer to:

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Who was the first African-American woman millionaire in the United States?

Madam C.J. Walker