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
5
votes
2 answers

How to decompress an XZ file faster in Java?

My SQLite db file of size 85MB is compressed using XZ format and its size has been reduced to 16MB. I use the following code (and a JAR provided by XZ for Java) to decompress it in Android Jelly Bean: try { FileInputStream fin = new…
Niamh Doyle
  • 1,909
  • 7
  • 30
  • 42
5
votes
2 answers

How to get the uncompressed size of an LZMA2 file (.xz / liblzma)

I'm looking for a way to get the uncompressed stream size of an LZMA2 / .xz file compressed with the xz utility. I'm using liblzma from Windows/Linux for this task, so I guess I'm looking for some C/C++ API in liblzma that will do the trick.
damageboy
  • 2,097
  • 19
  • 34
4
votes
1 answer

How does the ability to compress a stream affect a compression algorithm?

I recently backed up my soon-to-expire university home directory by sending it as a tar stream and compressing it on my end: ssh user@host "tar cf - my_dir/" | bzip2 > uni_backup.tar.bz2. This got me thinking: I only know the basics of how…
beta
  • 2,380
  • 21
  • 38
4
votes
0 answers

How to extract xz files in FLutter?

I need to decompress xz files in my flutter app. I have tried unsuccessfully the lzma plugin. Is there any way to decompress xz files in my app?
lechevo
  • 41
  • 1
4
votes
2 answers

Read xz files in go

How can I read xz files in a go program? When I try to read them using lzma, I get an error in lzma header error.
phihag
  • 278,196
  • 72
  • 453
  • 469
3
votes
0 answers

Removing null bytes from a file results in larger output after XZ compression

I am developing a custom file format consisting of a large number of integers. I'm using XZ to compress the data as it has the best compression ratio of all compression algorithms I've tested. All integers are stored as u32s in RAM, but they are all…
spaceface
  • 65
  • 1
  • 5
3
votes
2 answers

tar.xz - how to check uncompressed files size without decompress whole archive

I have a problem with checking uncompressed size from archive tar.xz without extract whole archive. I know that for tar.gz I can use gzip or zcat but for tar.xz it dosnt work. Any sugestion how to do this ?
simon
  • 47
  • 6
3
votes
4 answers

How do I read an .tar.xz file?

I downloaded the Gwern Branwen dataset here: https://www.gwern.net/DNM-archives I'm trying to read the dataset in R and I'm having a lot of trouble. I tried to open one of the files in the dataset called "1776.tar.xz" and I think I "unzipped" it…
bob
  • 117
  • 1
  • 1
  • 8
3
votes
2 answers

Create a tar.xz file on command line

How can I compress a tar file into a tar.xz file on Windows? I converted my folder into a tar file as follows: Selected the file Right-clicked one of the highlighted items Clicked add to archive Choose tar from the archive format drop-down menu
Jan
  • 117
  • 2
  • 8
3
votes
1 answer

Is there anything wrong with my code? Why are the compression and decompression speed slower compared to another app?

I'm creating compression and decompression app which are using xz compression method. But the compression and decompression are slower compared to another app which also uses the same compression method. For example, I have tried to decompress 15mb…
3
votes
3 answers

Safety of xz archive format

While looking for a good option to store large amounts of data (coming mostly from numerical computations) long-term, I arrived at using xz archive format (tar.xz). The default LZMA compression there provides significantly better archive sizes (for…
Anton Menshov
  • 2,266
  • 14
  • 34
  • 55
3
votes
0 answers

Error when trying to read an .xz file in R with readr functions

Sorry if I am not clear enough, this is my first question. I am not able to read an .xz file using different functions from package readr. In different parts of my code I have the following lines: dat <- read_lines(filename, progress = F, n_max =…
Vecino
  • 41
  • 5
3
votes
1 answer

How to unpack a .xz (lzma2) file using sharpcompress

I have downloaded the SharpCompress source code and created a simple console application to decompress a small .xz file. Following several different examples on the github site and other examples here on stackoverflow, I can't find any combinations…
mobiletonster
  • 407
  • 1
  • 6
  • 10
3
votes
0 answers

Incremental `docker image save | xz -zc - > images.tar.xz`

We have a Docker Compose project including various services, some of which share common base images. After building all images, one of our build job's post-build-steps is to docker image save | xz -zc - >images.tar.xz to create a single…
Robin479
  • 1,606
  • 15
  • 16
3
votes
3 answers

Extracting file from LZMA archive with R

I am trying to extract a file from a LZMA archive downloaded from an API containing JSON files, using R. On my computer I can extract the file manually in Windows Explorer with no problems. Here's my code currently (API details removed): tempFile <-…
RDRR
  • 860
  • 13
  • 16