XZ MIME Type
application/x-xz means, how to identify and decompress XZ data, and how Poly handles .xz files. MIME type details for application/x-xz
In active use| MIME type | application/x-xz |
|---|---|
| Extensions | .xz |
| Magic number | FD 37 7A 58 5A 00 |
| First standardized | 2009 |
| Created by | Lasse Collin and Igor Pavlov |
| Browser support | No native browser decompression |
| Example applications | XZ Utils, 7-Zip, GNU tar |
| Poly support | Partial. Poly recognizes .xz as application/x-xz and stores, syncs, shares, and versions the file, but does not decompress it. |
| Indexed by Poly | Partial. Poly indexes the XZ file's name and ordinary file properties, but not the compressed data or any tar members. |
| Preview in Poly | No. Poly has no in-app XZ decompressor or archive browser; download the file and open it with a compatible utility. |
| Poly agent | No. The Poly agent cannot read or reason about content inside an XZ stream. |
What does application/x-xz mean?
The application/x-xz media type identifies data stored in the XZ compressed stream format, normally in a file ending in .xz. XZ compression is lossless, so successful decompression reproduces the original bytes exactly.
The XZ format specification itself names .xz and application/x-xz.1 IANA's current application media-type registry does not list the subtype, so this is a widely deployed but unregistered media type. The x- prefix is part of that conventional name, not a separate version of XZ.2
.tar.xz file is normally a TAR archive compressed as one XZ stream. Tar supplies the member names, directory layout, permissions, and other archive metadata.Where did XZ come from?
Lasse Collin and Igor Pavlov designed the XZ file format. Version 1.0.0 of its specification was published on January 14, 2009, as a replacement for the older LZMA-Alone format used by LZMA SDK and LZMA Utils.1
XZ Utils is the reference command-line and library implementation. Its compression core is based on Pavlov's LZMA SDK but was substantially adapted for XZ Utils. The suite includes the xz command, the liblzma library, and a smaller decompression-only program named xzdec.3
XZ is a container for filter chains rather than the name of one bare compression algorithm. Current XZ streams commonly end their filter chain with LZMA2, an updated form of LZMA1. Optional executable and delta filters can transform certain inputs before LZMA2 compresses them.4
How do you identify an XZ file?
Every XZ stream begins with these six bytes:1
FD 37 7A 58 5A 00
7 z X Z
The non-text bytes at either end help prevent confusion with an old .lzma stream or a text file. A complete XZ stream also ends with 59 5A, the ASCII letters YZ, before any permitted padding. Checking both ends can quickly reveal a truncated download, but only a decoder can validate the complete block structure and integrity fields.1
An XZ file can contain multiple concatenated streams. Each stream contains a header, one or more compressed blocks, an index, and a footer. The index records block sizes and enables limited random access when the file was divided into suitably small independent blocks.15
Test a complete file without saving its decompressed output:
xz --test --verbose download.xz
XZ always protects structural headers with CRC32. A stream can protect uncompressed data with CRC32, CRC64, or SHA-256, or omit the data check. XZ Utils uses CRC64 by default.14 These checks detect accidental corruption. They do not authenticate the sender or make the output safe to open.
How do you open an application/x-xz file?
Web browsers do not provide a native XZ file viewer or decompression API. When a browser cannot display a response's media type, it normally offers the file as a download for another application.6
- XZ Utils supplies
xz,unxz, andxzcaton Unix-like systems and also publishes Windows builds.34 - 7-Zip can pack and unpack XZ streams.7
- GNU tar can call an XZ decompressor when working with
.tar.xzarchives.8
To preserve the compressed input while writing the decompressed file:
xz -dk report.csv.xz
For a TAR archive, inspect the members before extraction:
tar -tJf source.tar.xz
tar -xJf source.tar.xz -C empty-directory
The .xz stream does not store an original filename. XZ Utils derives an output name by removing the suffix, while the contents themselves could be text, an image, a TAR archive, or any other byte sequence.4
Support in Poly
Poly recognizes the .xz extension as application/x-xz and classifies the file as an archive. It can store, sync, share, version, download, and find the file by name.
Poly treats the compressed bytes as opaque:
- It does not decompress the XZ stream or inspect a TAR archive inside it.
- It does not index decompressed text, tar member names, or member metadata.
- It does not generate a thumbnail or provide an in-app archive browser.
- The Poly agent cannot read or reason about the compressed payload.
Download and decompress the file with a trusted utility when you need its contents. Adding the decompressed result to Poly separately lets that file use the preview and indexing pipeline for its own format.
Poly's filename mapping recognizes .xz, including a compound name such as backup.tar.xz because its final extension remains .xz. It does not map the shorthand .txz to this media type.
XZ, LZMA, and .tar.xz are different layers
These names are related, but they do not describe interchangeable files:
| Name | Typical extension | What it contains |
|---|---|---|
| XZ | .xz | One or more XZ streams, commonly using LZMA2 compression |
| LZMA-Alone | .lzma | A legacy LZMA1 stream with a small header and no XZ container |
| XZ-compressed TAR | .tar.xz | A TAR member archive used as the payload of an XZ stream |
Renaming archive.tar.xz to archive.tar does not decompress it. One XZ decompression step produces the tar file, after which a tar program can list or extract its members. Likewise, changing .lzma to .xz does not add the XZ header, index, footer, or integrity checks.14
To convert .tar.xz to ZIP, safely extract the TAR archive and create a new ZIP archive from the extracted tree. Converting a plain .xz first requires discovering what single file emerges after decompression.
Safety, memory, and integrity
Compression can make a small input expand into a much larger output. XZ's decoder memory requirement is also set by compression options stored in the file. The XZ Utils manual notes that ordinary preset -9 data currently needs about 65 MiB to decode, while specially constructed valid XZ files can require several gigabytes. Use --memlimit-decompress and an output-size limit when processing untrusted data.4
If the output is a TAR archive, review paths and links before extraction. Absolute paths, parent-directory references, symbolic links, executables, and unexpectedly large members can be dangerous even when the outer XZ checks pass.
Keep the decoder patched and obtain it from a trusted source. XZ Utils release tarballs 5.6.0 and 5.6.1 contained the CVE-2024-3094 backdoor. The incident affected those compromised software releases, not the XZ file-format specification or ordinary XZ data created by trustworthy tools.3
xz -lv file.xz to inspect stream, block, size, ratio, integrity-check, and decoder-memory information without extracting the payload. Listing metadata is useful triage, but it is not a substitute for testing the complete stream.4Footnotes
- The Tukaani Project. The
.xzFile Format Specification. Version 1.2.1 documents the media type, extension, designers, 2009 origin, signatures, stream structure, index, filters, and integrity fields. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 - Internet Assigned Numbers Authority. Media Types Registry. The current application registry does not list
application/x-xz. ↩ - The Tukaani Project. XZ Utils. The project page describes the implementation and components, publishes current releases, and records the affected releases in the CVE-2024-3094 incident. ↩ ↩2 ↩3
- The Tukaani Project. XZ Utils
xz(1)Manual. The manual documents suffix handling, LZMA2, commands, integrity checks, memory limits, listing, and format compatibility. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 - The Tukaani Project. The
.xzFile Format. The overview explains streamability, block indexes, filter chains, concatenation, padding, and available implementations. ↩ - MDN Web Docs. Media Types (MIME Types). MDN explains that browsers normally offer unknown, non-displayable application data for download. ↩
- 7-Zip. 7-Zip. The official feature list includes XZ among the formats supported for packing and unpacking. ↩
- Free Software Foundation. GNU tar Manual: Creating and Reading Compressed Archives. The manual documents XZ filtering and
.tar.xzhandling. ↩