• Stars
    star
    684
  • Rank 63,543 (Top 2 %)
  • Language
    C
  • License
    BSD 2-Clause "Sim...
  • Created over 14 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Parallel, indexed xz compressor

pixz

Build Status

Pixz (pronounced pixie) is a parallel, indexing version of xz.

Repository: https://github.com/vasi/pixz

Downloads: https://github.com/vasi/pixz/releases

pixz vs xz

The existing XZ Utils provide great compression in the .xz file format, but they produce just one big block of compressed data. Pixz instead produces a collection of smaller blocks which makes random access to the original data possible. This is especially useful for large tarballs.

Differences to xz

  • pixz automatically indexes tarballs during compression
  • pixz supports parallel decompression, which xz does not
  • pixz defaults to using all available CPU cores, while xz defaults to using only one core
  • pixz provides -i and -o command line options to specify input and output file
  • pixz does not support the command line option -z or --compress
  • pixz does not support the command line option -c or --stdout
  • -f command line option is incompatible
  • -l command line option output differs
  • -q command line option is incompatible
  • -t command line option is incompatible

Building pixz

General help about the building process's configuration step can be acquired via:

./configure --help

Dependencies

  • pthreads
  • liblzma 4.999.9-beta-212 or later (from the xz distribution)
  • libarchive 2.8 or later
  • AsciiDoc to generate the man page

Build from Release Tarball

./configure
make
make install

You many need sudo permissions to run make install.

Build from GitHub

git clone https://github.com/vasi/pixz.git
cd pixz
./autogen.sh
./configure
make
make install

You many need sudo permissions to run make install.

Usage

Single Files

Compress a single file (no tarball, just compression), multi-core:

pixz bar bar.xz

Decompress it, multi-core:

pixz -d bar.xz bar

Tarballs

Compress and index a tarball, multi-core:

pixz foo.tar foo.tpxz

Very quickly list the contents of the compressed tarball:

pixz -l foo.tpxz

Decompress the tarball, multi-core:

pixz -d foo.tpxz foo.tar

Very quickly extract a single file, multi-core, also verifies that contents match index:

pixz -x dir/file < foo.tpxz | tar x

Create a tarball using pixz for multi-core compression:

tar -Ipixz -cf foo.tpxz foo/

Specifying Input and Output

These are the same (also work for -x, -d and -l as well):

pixz foo.tar foo.tpxz
pixz < foo.tar > foo.tpxz
pixz -i foo.tar -o foo.tpxz

Extract the files from foo.tpxz into foo.tar:

pixz -x -i foo.tpxz -o foo.tar file1 file2 ...

Compress to foo.tpxz, removing the original:

pixz foo.tar

Extract to foo.tar, removing the original:

pixz -d foo.tpxz

Other Flags

Faster, worse compression:

pixz -1 foo.tar

Better, slower compression:

pixz -9 foo.tar

Use exactly 2 threads:

pixz -p 2 foo.tar

Compress, but do not treat it as a tarball, i.e. do not index it:

pixz -t foo.tar

Decompress, but do not check that contents match index:

pixz -d -t foo.tpxz

List the xz blocks instead of files:

pixz -l -t foo.tpxz

For even more tuning flags, check the manual page:

man pixz

Comparison to other Tools

plzip

  • about equally complex and efficient
  • lzip format seems less-used
  • version 1 is theoretically indexable, I think

ChopZip

  • written in Python, much simpler
  • more flexible, supports arbitrary compression programs
  • uses streams instead of blocks, not indexable
  • splits input and then combines output, much higher disk usage

pxz

  • simpler code
  • uses OpenMP instead of pthreads
  • uses streams instead of blocks, not indexable
  • uses temporary files and does not combine them until the whole file is compressed, high disk and memory usage

pbzip2

  • not indexable
  • appears slow
  • bzip2 algorithm is non-ideal

pigz

  • not indexable

dictzip, idzip

  • not parallel

More Repositories

1

squashfuse

FUSE filesystem to mount squashfs archives
C
283
star
2

osxutils

Mac-specific command line utilities (UPDATES)
C
108
star
3

positioned-io

Read and write from offsets in Rust.
Rust
63
star
4

vmdk-raw-parts

Create virtual disks which expose partitions of physical disks
Python
55
star
5

qcow2-fuse

Gain access to qcow2 virtual disk images as a user-space filesystem
Rust
53
star
6

lzopfs

Random access to compressed files with a FUSE filesystem
C++
26
star
7

diskfile

Expose a disk block device as a regular file (FUSE)
C
21
star
8

b2gui

A Mac build of the BasiliskII GUI (OBSOLETE)
C++
17
star
9

cloudflare-dns-backup-tool

Backup DNS settings from CloudFlare, and auto-push them to a git repo
Ruby
13
star
10

qcow2-rs

Rust support for qcow2 virtual disk images.
Rust
12
star
11

partorrent

Download only selected pieces of a torrent
Python
12
star
12

evnova-utils

Tools for examining Escape Velocity Nova files
Perl
10
star
13

rEFInd

EFI boot manager (PATCHES)
C
9
star
14

macports-tools

Tools for keeping MacPorts tidy
Ruby
9
star
15

hfsj

Hacky write access to journaled HFS+ on Linux
C
9
star
16

rhfs

Ruby tools for managing HFS disk images
Ruby
8
star
17

block_access_records

Fast block visibility checking for Drupal 8
PHP
7
star
18

partclone-utils

Mount partclone images (PATCHES)
C
7
star
19

event_sort

Drupal module for custom views sort of events
PHP
6
star
20

vdfuse

Mount virtual disks (FORK)
C
6
star
21

firefox-dock-progress

Displays a progress bar in the Mac OS X dock when files are downloading (deprecated)
JavaScript
6
star
22

squash.rb

Pure-ruby squashfs implementation
Ruby
6
star
23

qcow2

qcow2 disk image handling in Go. Also provides a FUSE filesystem!
Go
4
star
24

nicotine.app

Nicotine+ built for Mac OS X
Shell
3
star
25

lmnopuz

multiplayer web-based crosswords (FORK)
Ruby
3
star
26

pystickies

Print OS X stickies to the terminal, even from another OS
Python
3
star
27

montreal-election-data

Election data for the city of Montreal
Ruby
3
star
28

debsizes

Find which packages are using all your disk space (PROTOTYPE)
Python
3
star
29

repo-backup

Backup repositories from hosting services
Ruby
3
star
30

time-machine-size

Determine the disk space used by Time Machine backups
C
3
star
31

migrate_process_file

Drupal 8 migration process for importing files
PHP
3
star
32

gt5

diff-capable 'du-browser' (PATCHES)
Shell
3
star
33

resourcefork

Native reading and writing of resource forks in ruby, no Carbon required
Ruby
2
star
34

nhl_goals

Drupal module to demonstrate scraping paged data with RollingCurl
PHP
2
star
35

fuse-misc

Miscellaneous small FUSE filesystems
C
2
star
36

DockProgressTester

Test Firefox Mac dock progress performance
Objective-C
2
star
37

brewfoster

Keep a clean brew install
Ruby
2
star
38

gpt-print

Dump GPT partition tables
Ruby
2
star
39

drupal_dbtrace

Tracing DB queries in Drupal
1
star
40

popcon-graph

Terrible attempt at fetching and graphing Ubuntu popcon data
PHP
1
star
41

gitosis2gitlab

Proxy from old gitosis remotes to gitlab
Shell
1
star
42

vmfuse

Mount foreign filesystems using VirtualBox and lightweight clones (INCOMPLETE)
Ruby
1
star
43

docker-netbsd-anita

QEMU-based NetBSD docker image, backed by qcow2
Dockerfile
1
star
44

sshjour

SSH to machines that may or may not be on the LAN
Ruby
1
star
45

edebtags

Ersatz Debian tags and popularity tool
Ruby
1
star
46

toggl2rm

Copy timelogs from Toggl to Redmine
Ruby
1
star
47

hotstring

Automatic text expansion in GNOME (proof of concept)
Python
1
star
48

NSMine

Bug-fixed and customized version of the minesweeper app (FORK)
Objective-C
1
star
49

rpmkeeper

Find unused RPM packages
Python
1
star
50

uzip2ulzma

Convert FreeBSD uzip compressed images to higher-compression ulzma
Go
1
star
51

lvmfuse

Make LVM volumes available via FUSE (UNFINISHED)
C++
1
star
52

kdelibs

KDE core libraries (PATCHES)
C++
1
star
53

fuse-uzip

FUSE implementation of FreeBSD's geom_uzip compressed images
C
1
star
54

advent2022

Rust
1
star
55

mac-app-format

Show the executable formats of Mac applications
Perl
1
star
56

xmoto-build

Build scripts for X-Moto on OS X
Shell
1
star
57

honduras-election-2013

Scraped data for the Honduras election
Ruby
1
star
58

migrate_field_translated

Allow field-translated content to be migrated into Drupal 8 [WIP]
PHP
1
star