XZ 格式
关于XZ文件的一切
可创建
是
可解压
是
扩展名
.xz
平台
All
XZ 指南
什么是XZ文件?
An XZ file is a compressed file using the XZ Utils format, which employs the LZMA2 compression algorithm. XZ offers high compression ratios similar to 7z.
XZ is commonly used in the Linux world for software packages, kernel source archives, and .tar.xz files (the modern replacement for .tar.gz).
The format supports multiple compression algorithms but LZMA2 is the default, providing excellent compression at the cost of slower compression speed compared to GZIP.
7-Zip能打开XZ吗?
7-Zip can create and extract XZ files with LZMA2 compression.
7-Zip handles .tar.xz files transparently — both TAR and XZ layers are processed in one operation.
7-Zip can create .tar.xz archives directly by selecting "xz" as the format.
如何解压XZ文件
Right-click the .xz file
Locate your .xz or .tar.xz file, right-click it, and navigate to "7-Zip".
Choose extraction option
Select "Extract Here" to extract. For .tar.xz, 7-Zip handles both XZ and TAR layers automatically.
Access extracted files
The decompressed file or archive appears in the destination folder.
如何创建XZ压缩包
Select file(s) to compress
Select the file you want to compress into XZ format.
Open the archive dialog
Right-click > 7-Zip > "Add to archive..." and set the format to "xz".
Create the .xz file
Click OK. 7-Zip creates an .xz file with LZMA2 compression, offering high compression ratio.
如何给XZ加密
XZ does not support password protection or encryption.
For encrypted archives, use 7z or ZIP format with AES-256 encryption.
XZ 规格
| 扩展名 | .xz |
| 压缩 | LZMA2 |
| 加密 | Not supported |
| 平台 | All (native on modern Linux) |
| 最大大小 | Unlimited |
| 开发者 | Lasse Collin (XZ Utils) |
| MIME Type | application/x-xz |
XZ常见错误与解决方案
Cannot extract .xz file
原因: File corruption or missing software.
解决方案: Re-download the file. 7-Zip supports all standard XZ files. Ensure you have the latest 7-Zip version for LZMA2 support.
XZ vs 7Z
| Feature | XZ | 7z |
|---|---|---|
| Compression algorithm | LZMA2 | LZMA2 (same) |
| Multiple files | No (use .tar.xz) | Yes |
| Encryption | No | AES-256 |
| Linux native | Yes (modern distros) | No (needs p7zip) |
XZ FAQ
What is an .xz file?
An .xz file is a compressed file using the XZ format with LZMA2 compression. It offers high compression ratios and is common on Linux for packages and .tar.xz archives.
Can 7-Zip open .xz files?
Yes. 7-Zip can extract .xz and .tar.xz files on Windows. It handles both layers automatically for .tar.xz files.
Can 7-Zip create .xz files?
Yes. 7-Zip can create XZ compressed files. Right-click > 7-Zip > Add to archive > select "xz" format.
What is .tar.xz?
A .tar.xz file is a TAR archive compressed with XZ. It's the modern replacement for .tar.gz on Linux, offering better compression at the cost of slower compression speed.
Is XZ better than GZIP?
For compression ratio, yes — XZ (LZMA2) typically achieves 20-30% better compression than GZIP (deflate). However, XZ is slower to compress. Use XZ for storage, GZIP for speed.
准备使用7-Zip了吗?
立即下载免费、官方的7-Zip。