Questions tagged [xz]

xz is a lossless data compression program and file format which incorporates the LZMA/LZMA2 compression algorithms

XZ Utils (previously LZMA Utils) is a set of free command-line lossless data compressors, including LZMA and xz, for Unix-like operating systems and, from version 5.0 onwards, Microsoft Windows.

105 questions
221
votes
7 answers

Create a tar.xz in one command

I am trying to create a .tar.xz compressed archive in one command. What is the specific syntax for that? I have tried tar cf - file | xz file.tar.xz, but that does not work.
George K.
  • 2,867
  • 4
  • 19
  • 28
77
votes
9 answers

Why is *.tar.gz still much more common than *.tar.xz?

Whenever I see some source packages or binaries which are compressed with GZip I wonder if there are still reasons to favor gz over xz (excluding time travel to 2000), the savings of the LZMA compression algorithm are substantial and decompressions…
soc
  • 27,983
  • 20
  • 111
  • 215
50
votes
1 answer

Multiprocessor support for `xz`?

Is there a way to spread xz compression efforts across multiple CPU's? I realize that this doesn't appear possible with xz itself, but are there other utilities that implement the same compression algorithm that would allow more efficient processor…
ylluminate
  • 12,102
  • 17
  • 78
  • 152
37
votes
4 answers

Importing zipped files in Mysql using command line

Importing zipped files in Mysql using CMD What is the right syntax to import sql zipped files into mysql using cmd ? I am doing the following xz < backup.sql.gz | mysql -u root test But always getting the following error
Subrata
  • 2,216
  • 3
  • 24
  • 38
21
votes
2 answers

dd a compressed *.xz image into a partition

I'm trying to copy a compressed image into a partition inside a Beaglebone. Usually, it is a 2 step process: xz -d console.img.xz # console.img is created dd if=console.img of=/dev/mmcblk0p3 Is there a way, I can do it in a single step without…
Sayanee
  • 4,957
  • 4
  • 29
  • 35
16
votes
2 answers

How to unpack xz file with python which contains only data but no filename?

I have a file, which I can decompress under linux using the following command: unxz < file.xz > file.txt How can I do the same using python? If I use python3 and the tarfile module and do the following: import sys import tarfile try: with…
MiB_Coder
  • 865
  • 1
  • 7
  • 20
14
votes
3 answers

How to build Python 3.4.6 from source?

I want to install Python 3.4.6 but it is only available in source code format. The install options on the official Python website are Gzip'd source tarball and XZ compressed source tarball. I have never installed Python this way before so I don't…
Markus
  • 331
  • 2
  • 4
  • 13
11
votes
1 answer

Open xz file from the command line in Windows 10

My colleagues using mac or linux open xz files with this line: xz --decompress --stdout "file.csv.xz" On my pc, with windows 10, I get the following error: 'xz' is not recognized as an internal or external command, operable program or batch…
Julien Massardier
  • 1,326
  • 1
  • 11
  • 29
9
votes
1 answer

Installation of R 3.3.1 in Red Hat. LZMA version >=5.0.3 required

I am installing R 3.3.1 from source. During ./configure --enable-R-shlib execution, error pops up: checking for lzma_version_number in -llzma... yes checking lzma.h usability... yes checking lzma.h presence... yes checking for lzma.h... yes checking…
j1897
  • 1,507
  • 5
  • 21
  • 41
7
votes
1 answer

Iterate a large .xz file line by line in python

I have a large .xz file (few gigabytes). It's full of plain text. I want to process the text to create custom dataset. I want to read it line by line because it is too big. Anyone have an idea how to do it ? I already tried this How to open and read…
Andrej Hucko
  • 510
  • 1
  • 5
  • 15
7
votes
2 answers

use xz instead of gz - very slow

How to change these gzip methods to xz? This seems to work but runs really really REALLY slow... (~20-30x) // gzip ... | gzip -c -1 > /path // xz ... | xz -zf > /path Havent tested this yet, but is this the way to compress with xz? // gzip tar…
clarkk
  • 27,151
  • 72
  • 200
  • 340
6
votes
3 answers

Is it possible to extract a tar.xz package in golang?

Is it possible to extract a tar.xz package in golang? My understanding is it's possible to use the library for tar and sending it to an xz go library.
Fire
  • 306
  • 1
  • 4
  • 10
6
votes
2 answers

Python 2.7: Compressing data with the XZ format using the "lzma" module

I'm experimenting with the lzma module in Python 2.7.6 to see if I could create compressed files using the XZ format for a future project that will make use of it. My code used during the experiment was: import lzma as xz in_file =…
ki2ne
  • 78
  • 1
  • 1
  • 7
5
votes
3 answers

how to use XZ lib to compress/decompress file in android

https://tukaani.org/xz/java.html This site provide a XZ Library for compress/decompress files, I would like to give it a shot but I am lost. Anyone got experience on this? Or a tutorial? Thanks.
Saroj Raut
  • 123
  • 2
  • 9
5
votes
1 answer

PSQL Restore db file with xz

I created backup file psql.bak.xz of db, how to restore this file to db straight (without use unxz)? I used this command to compress file: pg_dump 2016 | xz > backups/psql.bak.xz Thanks, Michael.
Michael Horojanski
  • 4,543
  • 4
  • 33
  • 34
1
2 3 4 5 6 7