Home

Awesome

🦀 crabz

<p align="center"> <a href="https://github.com/sstadick/crabz/actions?query=workflow%3ACheck"><img src="https://github.com/sstadick/crabz/workflows/Check/badge.svg" alt="Build Status"></a> <img src="https://img.shields.io/crates/l/crabz.svg" alt="license"> <a href="https://crates.io/crates/crabz"><img src="https://img.shields.io/crates/v/crabz.svg?colorB=319e8c" alt="Version info"></a><br> Like pigz, but rust. </p>

A cross platform, fast, compression and decompression tool.

Synopsis

This is currently a proof of concept CLI tool using the gzp crate.

Supported formats:

Install

brew tap sstadick/crabz
brew install crabz
curl -LO https://github.com/sstadick/crabz/releases/download/<latest>/crabz-linux-amd64.deb
sudo dpkg -i crabz-linux-amd64.deb
cargo install crabz
conda install -c conda-forge crabz

Usage

❯ crabz -h              
Compress and decompress files

USAGE:
    crabz [FLAGS] [OPTIONS] [FILE]

FLAGS:
    -d, --decompress    
            Flag to switch to decompressing inputs. Note: this flag may change in future releases

    -h, --help          
            Prints help information

    -I, --in-place      
            Perform the compression / decompression in place.
            
            **NOTE** this will remove the input file at completion.
    -V, --version       
            Prints version information


OPTIONS:
    -l, --compression-level <compression-level>        
            Compression level [default: 6]

    -p, --compression-threads <compression-threads>
            Number of compression threads to use, or if decompressing a format that allow for multi-threaded
            decompression, the number to use. Note that > 4 threads for decompression doesn't seem to help [default:
            32]
    -f, --format <format>
            The format to use [default: gzip]  [possible values: gzip, bgzf, mgzip,
            zlib, deflate, snap]
    -o, --output <output>                              
            Output path to write to, empty or "-" to write to stdout

    -P, --pin-at <pin-at>                              
            Specify the physical core to pin threads at.
            
            This can provide a significant performance improvement, but has the downside of possibly conflicting with
            other pinned cores. If you are running multiple instances of `crabz` at once you can manually space out the
            pinned cores.
            
            # Example
            - Instance 1 has `-p 4 -P 0` set indicating that it will use 4 cores pinned at 0, 1, 2, 3
            - Instance 2 has `-p 4 -P 4` set indicating that it will use 4 cores pinned at 4, 5, 6, 7

ARGS:
    <FILE>    
            Input file to read from, empty or "-" to read from stdin

Benchmarks

These benchmarks use the data in bench-data catted together 100 times. Run with bash ./benchmark.sh data.txt.

Benchmark system specs: Ubuntu 20 AMD Ryzen 9 3950X 16-Core Processor w/ 64 GB DDR4 memory and 1TB NVMe Drive

pigz v2.4 installed via apt on Ubuntu

Takeaways:

It is already known that zlib-ng is faster than zlib, so none of this is groundbreaking. However, I think crabz gets an an edge due to the following:

With regards to block formats like Mgzip and BGZF, crabz is using libdeflater by default which excels at compressing and decompression known-sized blocks. This makes block compression formats very fast at a small loss to the compression ratio.

See end of benchmarks section for comparison against bgzip.

As crabz is just a wrapper for the gzp library, the most exciting thing about these benchmarks is that gzp is on par with best in class CLI tools for multi-threaded compression and decompression as a library.

Flate2 zlib-ng backend

Compression

CommandMean [s]Min [s]Max [s]Relative
crabz -p 1 -c 3 < ./data.txt6.450 ± 0.0696.3286.54016.86 ± 0.24
pigz -p 1 -3 < ./data.txt11.404 ± 0.15211.18611.71729.81 ± 0.49
crabz -p 2 -c 3 < ./data.txt3.437 ± 0.0173.4183.4618.98 ± 0.10
pigz -p 2 -3 < ./data.txt5.868 ± 0.0315.8265.92715.34 ± 0.17
crabz -p 4 -c 3 < ./data.txt1.741 ± 0.0081.7291.7524.55 ± 0.05
pigz -p 4 -3 < ./data.txt2.952 ± 0.0082.9392.9607.72 ± 0.08
crabz -p 8 -c 3 < ./data.txt0.889 ± 0.0040.8820.8952.32 ± 0.02
pigz -p 8 -3 < ./data.txt1.505 ± 0.0081.4931.5203.93 ± 0.04
crabz -p 16 -c 3 < ./data.txt0.485 ± 0.0140.4570.5021.27 ± 0.04
pigz -p 16 -3 < ./data.txt0.775 ± 0.0110.7640.7972.02 ± 0.04
crabz -p 32 -c 3 < ./data.txt0.383 ± 0.0040.3750.3881.00
pigz -p 32 -3 < ./data.txt0.699 ± 0.0290.6680.7701.83 ± 0.08
crabz -p 1 -c 6 < ./data.txt10.367 ± 0.21110.10610.64227.10 ± 0.61
pigz -p 1 -6 < ./data.txt26.734 ± 0.34526.23427.13569.89 ± 1.12
crabz -p 2 -c 6 < ./data.txt5.366 ± 0.0365.2995.42914.03 ± 0.16
pigz -p 2 -6 < ./data.txt13.589 ± 0.08313.42813.67935.52 ± 0.40
crabz -p 4 -c 6 < ./data.txt2.719 ± 0.0212.6942.7577.11 ± 0.09
pigz -p 4 -6 < ./data.txt6.887 ± 0.0136.8716.91618.00 ± 0.17
crabz -p 8 -c 6 < ./data.txt1.381 ± 0.0071.3721.3973.61 ± 0.04
pigz -p 8 -6 < ./data.txt3.479 ± 0.0083.4633.4889.09 ± 0.09
crabz -p 16 -c 6 < ./data.txt0.745 ± 0.0220.7270.8041.95 ± 0.06
pigz -p 16 -6 < ./data.txt1.818 ± 0.0361.7651.8744.75 ± 0.10
crabz -p 32 -c 6 < ./data.txt0.549 ± 0.0060.5380.5571.44 ± 0.02
pigz -p 32 -6 < ./data.txt1.187 ± 0.0111.1721.2103.10 ± 0.04
crabz -p 1 -c 9 < ./data.txt30.114 ± 0.19629.84230.42078.72 ± 0.90
pigz -p 1 -9 < ./data.txt51.369 ± 0.16451.24651.698134.29 ± 1.33
crabz -p 2 -c 9 < ./data.txt15.371 ± 0.07015.20215.44340.18 ± 0.42
pigz -p 2 -9 < ./data.txt26.452 ± 0.08526.25326.57669.15 ± 0.69
crabz -p 4 -c 9 < ./data.txt7.729 ± 0.0227.6997.76820.20 ± 0.20
pigz -p 4 -9 < ./data.txt13.365 ± 0.04713.27113.44934.94 ± 0.35
crabz -p 8 -c 9 < ./data.txt3.901 ± 0.0063.8893.91010.20 ± 0.10
pigz -p 8 -9 < ./data.txt6.749 ± 0.0146.7376.78117.64 ± 0.17
crabz -p 16 -c 9 < ./data.txt2.039 ± 0.0241.9972.0715.33 ± 0.08
pigz -p 16 -9 < ./data.txt3.486 ± 0.0543.4263.5749.11 ± 0.17
crabz -p 32 -c 9 < ./data.txt1.337 ± 0.0721.2201.4113.49 ± 0.19
pigz -p 32 -9 < ./data.txt2.203 ± 0.1142.0822.3785.76 ± 0.30

Decompression

CommandMean [s]Min [s]Max [s]Relative
crabz -d < ./data.3.txt.gz1.422 ± 0.0101.4111.4371.03 ± 0.02
pigz -d < ./data.3.txt.gz1.674 ± 0.0311.6211.7051.21 ± 0.03
crabz -d < ./data.6.txt.gz1.403 ± 0.0161.3891.4271.01 ± 0.02
pigz -d < ./data.6.txt.gz1.724 ± 0.0261.6971.7661.24 ± 0.02
crabz -d < ./data.9.txt.gz1.385 ± 0.0181.3591.4161.00
pigz -d < ./data.9.txt.gz1.745 ± 0.0441.6841.7971.26 ± 0.04

Flate2 zlib backend

Compression

CommandMean [s]Min [s]Max [s]Relative
crabz -p 1 -c 3 < ./data.txt11.248 ± 0.24711.08511.53220.23 ± 0.45
pigz -p 1 -3 < ./data.txt11.296 ± 0.17111.10411.43420.32 ± 0.31
crabz -p 2 -c 3 < ./data.txt5.681 ± 0.0405.6455.72510.22 ± 0.08
pigz -p 2 -3 < ./data.txt5.926 ± 0.0155.9165.94410.66 ± 0.04
crabz -p 4 -c 3 < ./data.txt2.891 ± 0.0072.8832.8955.20 ± 0.02
pigz -p 4 -3 < ./data.txt2.966 ± 0.0132.9552.9805.34 ± 0.03
crabz -p 8 -c 3 < ./data.txt1.461 ± 0.0031.4591.4652.63 ± 0.01
pigz -p 8 -3 < ./data.txt1.509 ± 0.0041.5051.5122.71 ± 0.01
crabz -p 16 -c 3 < ./data.txt0.784 ± 0.0100.7750.7951.41 ± 0.02
pigz -p 16 -3 < ./data.txt0.772 ± 0.0100.7650.7841.39 ± 0.02
crabz -p 32 -c 3 < ./data.txt0.556 ± 0.0020.5540.5571.00
pigz -p 32 -3 < ./data.txt0.743 ± 0.0470.6940.7861.34 ± 0.08
crabz -p 1 -c 6 < ./data.txt26.366 ± 0.15426.18926.46947.42 ± 0.31
pigz -p 1 -6 < ./data.txt26.688 ± 0.10326.57926.78348.00 ± 0.23
crabz -p 2 -c 6 < ./data.txt13.443 ± 0.06913.40013.52324.18 ± 0.14
pigz -p 2 -6 < ./data.txt13.605 ± 0.05913.56713.67324.47 ± 0.13
crabz -p 4 -c 6 < ./data.txt6.833 ± 0.0056.8286.83712.29 ± 0.03
pigz -p 4 -6 < ./data.txt6.866 ± 0.0286.8346.88412.35 ± 0.06
crabz -p 8 -c 6 < ./data.txt3.446 ± 0.0003.4453.4466.20 ± 0.02
pigz -p 8 -6 < ./data.txt3.482 ± 0.0023.4803.4836.26 ± 0.02
crabz -p 16 -c 6 < ./data.txt1.822 ± 0.0121.8131.8353.28 ± 0.02
pigz -p 16 -6 < ./data.txt1.771 ± 0.0041.7671.7763.19 ± 0.01
crabz -p 32 -c 6 < ./data.txt1.178 ± 0.0081.1711.1872.12 ± 0.02
pigz -p 32 -6 < ./data.txt1.184 ± 0.0011.1841.1852.13 ± 0.01
crabz -p 1 -c 9 < ./data.txt52.122 ± 0.28851.79052.29393.75 ± 0.58
pigz -p 1 -9 < ./data.txt53.031 ± 0.07152.95153.08595.39 ± 0.29
crabz -p 2 -c 9 < ./data.txt26.287 ± 0.04726.24926.33947.28 ± 0.15
pigz -p 2 -9 < ./data.txt26.409 ± 0.23826.19026.66247.50 ± 0.45
crabz -p 4 -c 9 < ./data.txt13.373 ± 0.05113.31713.41924.05 ± 0.11
pigz -p 4 -9 < ./data.txt13.414 ± 0.03513.38313.45124.13 ± 0.09
crabz -p 8 -c 9 < ./data.txt6.733 ± 0.0036.7316.73612.11 ± 0.03
pigz -p 8 -9 < ./data.txt6.763 ± 0.0046.7616.76712.16 ± 0.03
crabz -p 16 -c 9 < ./data.txt3.487 ± 0.0343.4503.5176.27 ± 0.06
pigz -p 16 -9 < ./data.txt3.459 ± 0.0213.4343.4736.22 ± 0.04
crabz -p 32 -c 9 < ./data.txt2.088 ± 0.0082.0812.0973.76 ± 0.02
pigz -p 32 -9 < ./data.txt2.107 ± 0.0232.0902.1333.79 ± 0.04

Decompression

Flate2 rust backend

Compression

CommandMean [s]Min [s]Max [s]Relative
crabz -p 1 -c 3 < ./data.txt10.167 ± 0.16410.05010.35518.57 ± 0.33
pigz -p 1 -3 < ./data.txt11.338 ± 0.07111.29211.42020.71 ± 0.21
crabz -p 2 -c 3 < ./data.txt4.912 ± 0.0134.8984.9208.97 ± 0.08
pigz -p 2 -3 < ./data.txt5.876 ± 0.0475.8265.91910.73 ± 0.12
crabz -p 4 -c 3 < ./data.txt2.463 ± 0.0182.4472.4824.50 ± 0.05
pigz -p 4 -3 < ./data.txt2.967 ± 0.0082.9582.9725.42 ± 0.05
crabz -p 8 -c 3 < ./data.txt1.255 ± 0.0051.2501.2612.29 ± 0.02
pigz -p 8 -3 < ./data.txt1.509 ± 0.0021.5071.5112.76 ± 0.02
crabz -p 16 -c 3 < ./data.txt0.705 ± 0.0300.6730.7311.29 ± 0.05
pigz -p 16 -3 < ./data.txt0.780 ± 0.0150.7680.7971.42 ± 0.03
crabz -p 32 -c 3 < ./data.txt0.547 ± 0.0040.5440.5521.00
pigz -p 32 -3 < ./data.txt0.755 ± 0.0250.7260.7711.38 ± 0.05
crabz -p 1 -c 6 < ./data.txt27.064 ± 0.28826.86327.39449.44 ± 0.66
pigz -p 1 -6 < ./data.txt27.034 ± 0.09026.93827.11749.38 ± 0.43
crabz -p 2 -c 6 < ./data.txt12.400 ± 0.08312.32112.48722.65 ± 0.24
pigz -p 2 -6 < ./data.txt13.619 ± 0.07413.55813.70224.88 ± 0.24
crabz -p 4 -c 6 < ./data.txt6.279 ± 0.0236.2636.30511.47 ± 0.10
pigz -p 4 -6 < ./data.txt6.879 ± 0.0206.8676.90112.57 ± 0.11
crabz -p 8 -c 6 < ./data.txt3.189 ± 0.0103.1783.1985.83 ± 0.05
pigz -p 8 -6 < ./data.txt3.477 ± 0.0073.4703.4836.35 ± 0.05
crabz -p 16 -c 6 < ./data.txt1.756 ± 0.0151.7401.7713.21 ± 0.04
pigz -p 16 -6 < ./data.txt1.799 ± 0.0241.7791.8273.29 ± 0.05
crabz -p 32 -c 6 < ./data.txt1.192 ± 0.0111.1831.2052.18 ± 0.03
pigz -p 32 -6 < ./data.txt1.196 ± 0.0161.1831.2142.19 ± 0.03
crabz -p 1 -c 9 < ./data.txt44.907 ± 0.28344.58545.11682.03 ± 0.84
pigz -p 1 -9 < ./data.txt53.109 ± 1.04952.37354.31197.02 ± 2.07
crabz -p 2 -c 9 < ./data.txt19.977 ± 0.15919.81920.13636.49 ± 0.41
pigz -p 2 -9 < ./data.txt26.562 ± 0.13426.40726.64348.52 ± 0.46
crabz -p 4 -c 9 < ./data.txt10.397 ± 0.48410.07010.95318.99 ± 0.90
pigz -p 4 -9 < ./data.txt13.346 ± 0.04013.30013.37224.38 ± 0.21
crabz -p 8 -c 9 < ./data.txt5.100 ± 0.0215.0765.1149.32 ± 0.08
pigz -p 8 -9 < ./data.txt6.754 ± 0.0166.7366.76712.34 ± 0.10
crabz -p 16 -c 9 < ./data.txt2.716 ± 0.0142.7082.7324.96 ± 0.05
pigz -p 16 -9 < ./data.txt3.444 ± 0.0383.4203.4876.29 ± 0.09
crabz -p 32 -c 9 < ./data.txt1.747 ± 0.0091.7401.7583.19 ± 0.03
pigz -p 32 -9 < ./data.txt2.086 ± 0.0082.0772.0933.81 ± 0.03

Decompression

CommandMean [s]Min [s]Max [s]Relative
crabz -d < ./data.3.txt.gz1.599 ± 0.0141.5731.6151.00
pigz -d < ./data.3.txt.gz1.696 ± 0.0201.6541.7251.06 ± 0.02
crabz -d < ./data.6.txt.gz1.615 ± 0.0121.5861.6261.01 ± 0.01
pigz -d < ./data.6.txt.gz1.760 ± 0.0301.6871.7971.10 ± 0.02
crabz -d < ./data.9.txt.gz1.613 ± 0.0141.5961.6411.01 ± 0.01
pigz -d < ./data.9.txt.gz1.767 ± 0.0121.7481.7871.11 ± 0.01

Block Formats with libdeflater

Decompression

CommandMean [s]Min [s]Max [s]Relative
crabz -p 1 -d -f mgzip ./bdata.3.txt.gz > data.txt1.221 ± 0.1641.0731.3972.32 ± 0.31
pigz -d -c ./bdata.3.txt.gz > data.txt2.415 ± 0.0632.3472.4724.58 ± 0.14
crabz -p 1 -d -f mgzip ./bdata.6.txt.gz > data.txt1.256 ± 0.0631.2001.3252.38 ± 0.13
pigz -d -c ./bdata.6.txt.gz > data.txt2.513 ± 0.0522.4672.5694.77 ± 0.13
crabz -p 1 -d -f mgzip ./bdata.9.txt.gz > data.txt1.147 ± 0.0651.0941.2192.18 ± 0.13
pigz -d -c ./bdata.9.txt.gz > data.txt2.394 ± 0.1182.2622.4884.54 ± 0.24
crabz -p 1 -d -f mgzip ./bdata.12.txt.gz > data.txt1.165 ± 0.0741.1061.2482.21 ± 0.15
pigz -d -c ./bdata.12.txt.gz > data.txt2.457 ± 0.0672.4082.5344.66 ± 0.15
crabz -p 2 -d -f mgzip ./bdata.3.txt.gz > data.txt0.634 ± 0.0080.6280.6421.20 ± 0.03
pigz -d -c ./bdata.3.txt.gz > data.txt2.379 ± 0.0122.3682.3914.51 ± 0.08
crabz -p 2 -d -f mgzip ./bdata.6.txt.gz > data.txt0.645 ± 0.0150.6290.6581.22 ± 0.03
pigz -d -c ./bdata.6.txt.gz > data.txt2.438 ± 0.0732.3562.4974.62 ± 0.16
crabz -p 2 -d -f mgzip ./bdata.9.txt.gz > data.txt0.659 ± 0.0150.6440.6741.25 ± 0.04
pigz -d -c ./bdata.9.txt.gz > data.txt2.451 ± 0.0752.4002.5384.65 ± 0.16
crabz -p 2 -d -f mgzip ./bdata.12.txt.gz > data.txt0.656 ± 0.0150.6470.6731.24 ± 0.04
pigz -d -c ./bdata.12.txt.gz > data.txt2.450 ± 0.0452.4122.5004.65 ± 0.12
crabz -p 4 -d -f mgzip ./bdata.3.txt.gz > data.txt0.577 ± 0.0240.5540.6031.10 ± 0.05
pigz -d -c ./bdata.3.txt.gz > data.txt2.459 ± 0.0522.4202.5184.66 ± 0.13
crabz -p 4 -d -f mgzip ./bdata.6.txt.gz > data.txt0.559 ± 0.0240.5310.5761.06 ± 0.05
pigz -d -c ./bdata.6.txt.gz > data.txt2.538 ± 0.0442.5022.5874.81 ± 0.12
crabz -p 4 -d -f mgzip ./bdata.9.txt.gz > data.txt0.552 ± 0.0110.5390.5601.05 ± 0.03
pigz -d -c ./bdata.9.txt.gz > data.txt2.402 ± 0.0182.3852.4204.56 ± 0.08
crabz -p 4 -d -f mgzip ./bdata.12.txt.gz > data.txt0.592 ± 0.0400.5460.6161.12 ± 0.08
pigz -d -c ./bdata.12.txt.gz > data.txt2.525 ± 0.0382.4842.5584.79 ± 0.11
crabz -p 8 -d -f mgzip ./bdata.3.txt.gz > data.txt0.563 ± 0.0130.5480.5711.07 ± 0.03
pigz -d -c ./bdata.3.txt.gz > data.txt2.490 ± 0.1262.3692.6214.72 ± 0.25
crabz -p 8 -d -f mgzip ./bdata.6.txt.gz > data.txt0.552 ± 0.0180.5330.5691.05 ± 0.04
pigz -d -c ./bdata.6.txt.gz > data.txt2.531 ± 0.1152.4172.6474.80 ± 0.23
crabz -p 8 -d -f mgzip ./bdata.9.txt.gz > data.txt0.603 ± 0.0290.5830.6361.14 ± 0.06
pigz -d -c ./bdata.9.txt.gz > data.txt2.483 ± 0.0422.4352.5154.71 ± 0.11
crabz -p 8 -d -f mgzip ./bdata.12.txt.gz > data.txt0.527 ± 0.0090.5190.5371.00
pigz -d -c ./bdata.12.txt.gz > data.txt2.524 ± 0.0932.4172.5834.79 ± 0.19
crabz -p 16 -d -f mgzip ./bdata.3.txt.gz > data.txt0.603 ± 0.0580.5510.6651.14 ± 0.11
pigz -d -c ./bdata.3.txt.gz > data.txt2.392 ± 0.0072.3842.3974.54 ± 0.08
crabz -p 16 -d -f mgzip ./bdata.6.txt.gz > data.txt0.611 ± 0.0650.5650.6861.16 ± 0.13
pigz -d -c ./bdata.6.txt.gz > data.txt2.593 ± 0.1482.4272.7124.92 ± 0.29
crabz -p 16 -d -f mgzip ./bdata.9.txt.gz > data.txt0.564 ± 0.0270.5410.5941.07 ± 0.05
pigz -d -c ./bdata.9.txt.gz > data.txt2.426 ± 0.0232.4042.4504.60 ± 0.09
crabz -p 16 -d -f mgzip ./bdata.12.txt.gz > data.txt0.601 ± 0.0200.5820.6231.14 ± 0.04
pigz -d -c ./bdata.12.txt.gz > data.txt2.528 ± 0.0222.5072.5504.80 ± 0.09
crabz -p 32 -d -f mgzip ./bdata.3.txt.gz > data.txt0.595 ± 0.0190.5770.6141.13 ± 0.04
pigz -d -c ./bdata.3.txt.gz > data.txt2.544 ± 0.1072.4222.6214.83 ± 0.22
crabz -p 32 -d -f mgzip ./bdata.6.txt.gz > data.txt0.601 ± 0.0210.5860.6261.14 ± 0.05
pigz -d -c ./bdata.6.txt.gz > data.txt2.519 ± 0.1142.4352.6494.78 ± 0.23
crabz -p 32 -d -f mgzip ./bdata.9.txt.gz > data.txt0.565 ± 0.0230.5390.5791.07 ± 0.05
pigz -d -c ./bdata.9.txt.gz > data.txt2.487 ± 0.0642.4152.5404.72 ± 0.15
crabz -p 32 -d -f mgzip ./bdata.12.txt.gz > data.txt0.557 ± 0.0130.5480.5711.06 ± 0.03
pigz -d -c ./bdata.12.txt.gz > data.txt2.505 ± 0.1052.4422.6264.75 ± 0.22

crabz, pigz, and bgzip

These benchmarks were run on the all_train.csv data found here

Compression

CommandMean [s]Min [s]Max [s]Relative
crabz -p 2 -P 0 -l 2 -f bgzf ./data.txt > ./data.out.txt.gz15.837 ± 0.13715.68815.9595.52 ± 0.13
bgzip -c -@ 2 -l 2 ./data.txt > ./data.out.txt.gz19.471 ± 0.17819.26819.6026.78 ± 0.16
crabz -p 2 -P 0 -l 2 -f gzip ./data.txt > ./data.out.txt.gz19.723 ± 0.63219.28520.4486.87 ± 0.26
pigz -c -p 2 -2 ./data.txt > ./data.out.txt.gz32.249 ± 0.02432.22632.27411.24 ± 0.24
crabz -p 4 -P 0 -l 2 -f bgzf ./data.txt > ./data.out.txt.gz8.601 ± 0.5388.0409.1133.00 ± 0.20
bgzip -c -@ 4 -l 2 ./data.txt > ./data.out.txt.gz10.953 ± 0.03310.92910.9903.82 ± 0.08
crabz -p 4 -P 0 -l 2 -f gzip ./data.txt > ./data.out.txt.gz10.887 ± 0.58410.23611.3643.79 ± 0.22
pigz -c -p 4 -2 ./data.txt > ./data.out.txt.gz16.493 ± 0.32316.25716.8615.75 ± 0.17
crabz -p 8 -P 0 -l 2 -f bgzf ./data.txt > ./data.out.txt.gz5.206 ± 0.3724.7805.4641.81 ± 0.14
bgzip -c -@ 8 -l 2 ./data.txt > ./data.out.txt.gz6.920 ± 0.0336.8936.9572.41 ± 0.05
crabz -p 8 -P 0 -l 2 -f gzip ./data.txt > ./data.out.txt.gz5.893 ± 0.1355.7776.0412.05 ± 0.06
pigz -c -p 8 -2 ./data.txt > ./data.out.txt.gz8.974 ± 0.4678.5539.4773.13 ± 0.18
crabz -p 16 -P 0 -l 2 -f bgzf ./data.txt > ./data.out.txt.gz2.870 ± 0.0612.8162.9361.00
bgzip -c -@ 16 -l 2 ./data.txt > ./data.out.txt.gz5.124 ± 0.1075.0405.2441.79 ± 0.05
crabz -p 16 -P 0 -l 2 -f gzip ./data.txt > ./data.out.txt.gz4.250 ± 0.3233.9334.5791.48 ± 0.12
pigz -c -p 16 -2 ./data.txt > ./data.out.txt.gz4.767 ± 0.2234.5134.9331.66 ± 0.09
crabz -p 32 -P 0 -l 2 -f bgzf ./data.txt > ./data.out.txt.gz3.669 ± 0.3033.3203.8651.28 ± 0.11
bgzip -c -@ 32 -l 2 ./data.txt > ./data.out.txt.gz4.676 ± 0.0384.6324.7011.63 ± 0.04
crabz -p 32 -P 0 -l 2 -f gzip ./data.txt > ./data.out.txt.gz4.324 ± 0.2464.1434.6051.51 ± 0.09
pigz -c -p 32 -2 ./data.txt > ./data.out.txt.gz5.854 ± 0.0705.7955.9312.04 ± 0.05
crabz -p 2 -P 0 -l 6 -f bgzf ./data.txt > ./data.out.txt.gz27.696 ± 0.14727.59327.8649.65 ± 0.21
bgzip -c -@ 2 -l 6 ./data.txt > ./data.out.txt.gz30.961 ± 0.44630.44631.23110.79 ± 0.28
crabz -p 2 -P 0 -l 6 -f gzip ./data.txt > ./data.out.txt.gz36.229 ± 0.17536.09236.42712.62 ± 0.27
pigz -c -p 2 -6 ./data.txt > ./data.out.txt.gz97.175 ± 0.57196.74397.82333.86 ± 0.74
crabz -p 4 -P 0 -l 6 -f bgzf ./data.txt > ./data.out.txt.gz14.802 ± 0.43614.31615.1595.16 ± 0.19
bgzip -c -@ 4 -l 6 ./data.txt > ./data.out.txt.gz16.927 ± 0.13016.78917.0485.90 ± 0.13
crabz -p 4 -P 0 -l 6 -f gzip ./data.txt > ./data.out.txt.gz19.192 ± 0.67518.62919.9406.69 ± 0.27
pigz -c -p 4 -6 ./data.txt > ./data.out.txt.gz49.305 ± 0.11449.20349.42917.18 ± 0.37
crabz -p 8 -P 0 -l 6 -f bgzf ./data.txt > ./data.out.txt.gz7.833 ± 0.0657.7847.9072.73 ± 0.06
bgzip -c -@ 8 -l 6 ./data.txt > ./data.out.txt.gz9.858 ± 0.1059.7399.9393.43 ± 0.08
crabz -p 8 -P 0 -l 6 -f gzip ./data.txt > ./data.out.txt.gz10.417 ± 0.9799.62611.5113.63 ± 0.35
pigz -c -p 8 -6 ./data.txt > ./data.out.txt.gz25.276 ± 0.17025.08325.4048.81 ± 0.20
crabz -p 16 -P 0 -l 6 -f bgzf ./data.txt > ./data.out.txt.gz4.704 ± 0.3214.3374.9371.64 ± 0.12
bgzip -c -@ 16 -l 6 ./data.txt > ./data.out.txt.gz6.565 ± 0.1556.4296.7342.29 ± 0.07
crabz -p 16 -P 0 -l 6 -f gzip ./data.txt > ./data.out.txt.gz5.722 ± 0.3205.5306.0921.99 ± 0.12
pigz -c -p 16 -6 ./data.txt > ./data.out.txt.gz13.673 ± 0.12913.52513.7624.76 ± 0.11
crabz -p 32 -P 0 -l 6 -f bgzf ./data.txt > ./data.out.txt.gz4.202 ± 0.2133.9574.3281.46 ± 0.08
bgzip -c -@ 32 -l 6 ./data.txt > ./data.out.txt.gz5.538 ± 0.1355.3955.6631.93 ± 0.06
crabz -p 32 -P 0 -l 6 -f gzip ./data.txt > ./data.out.txt.gz5.488 ± 0.0645.4235.5501.91 ± 0.05
pigz -c -p 32 -6 ./data.txt > ./data.out.txt.gz9.079 ± 0.2868.8089.3793.16 ± 0.12
crabz -p 2 -P 0 -l 9 -f bgzf ./data.txt > ./data.out.txt.gz162.875 ± 0.100162.778162.97756.75 ± 1.20
bgzip -c -@ 2 -l 9 ./data.txt > ./data.out.txt.gz172.428 ± 0.242172.207172.68760.08 ± 1.27
crabz -p 2 -P 0 -l 9 -f gzip ./data.txt > ./data.out.txt.gz139.245 ± 0.270138.974139.51448.52 ± 1.03
pigz -c -p 2 -9 ./data.txt > ./data.out.txt.gz209.645 ± 0.058209.580209.69173.05 ± 1.55
crabz -p 4 -P 0 -l 9 -f bgzf ./data.txt > ./data.out.txt.gz84.624 ± 0.18584.41484.76229.49 ± 0.63
bgzip -c -@ 4 -l 9 ./data.txt > ./data.out.txt.gz87.228 ± 0.23287.05387.49230.39 ± 0.65
crabz -p 4 -P 0 -l 9 -f gzip ./data.txt > ./data.out.txt.gz72.339 ± 0.16672.18772.51725.21 ± 0.54
pigz -c -p 4 -9 ./data.txt > ./data.out.txt.gz106.579 ± 0.236106.307106.73137.14 ± 0.79
crabz -p 8 -P 0 -l 9 -f bgzf ./data.txt > ./data.out.txt.gz42.988 ± 0.13042.90543.13814.98 ± 0.32
bgzip -c -@ 8 -l 9 ./data.txt > ./data.out.txt.gz44.550 ± 0.09744.44944.64215.52 ± 0.33
crabz -p 8 -P 0 -l 9 -f gzip ./data.txt > ./data.out.txt.gz36.555 ± 0.03036.52136.57912.74 ± 0.27
pigz -c -p 8 -9 ./data.txt > ./data.out.txt.gz54.047 ± 0.01654.03054.06218.83 ± 0.40
crabz -p 16 -P 0 -l 9 -f bgzf ./data.txt > ./data.out.txt.gz22.391 ± 0.23422.15422.6237.80 ± 0.18
bgzip -c -@ 16 -l 9 ./data.txt > ./data.out.txt.gz24.041 ± 0.23723.81324.2868.38 ± 0.20
crabz -p 16 -P 0 -l 9 -f gzip ./data.txt > ./data.out.txt.gz19.285 ± 0.12519.14119.3636.72 ± 0.15
pigz -c -p 16 -9 ./data.txt > ./data.out.txt.gz27.645 ± 0.07827.57927.7319.63 ± 0.21
crabz -p 32 -P 0 -l 9 -f bgzf ./data.txt > ./data.out.txt.gz15.148 ± 0.13814.99215.2525.28 ± 0.12
bgzip -c -@ 32 -l 9 ./data.txt > ./data.out.txt.gz16.091 ± 0.19315.87416.2435.61 ± 0.14
crabz -p 32 -P 0 -l 9 -f gzip ./data.txt > ./data.out.txt.gz11.832 ± 0.16811.63711.9304.12 ± 0.11
pigz -c -p 32 -9 ./data.txt > ./data.out.txt.gz16.912 ± 0.09516.80416.9825.89 ± 0.13

Decompression

CommandMean [s]Min [s]Max [s]Relative
crabz -d -p 4 -f bgzf ./data.txt.gz > ./data.out.txt5.941 ± 0.1725.7456.0701.11 ± 0.09
bgzip -d -c -@ 4 ./data.txt.gz > ./data.out.txt5.357 ± 0.4074.9255.7341.00
crabz -d -p 8 -f bgzf ./data.txt.gz > ./data.out.txt5.569 ± 0.4965.0235.9901.04 ± 0.12
bgzip -d -c -@ 8 ./data.txt.gz > ./data.out.txt5.867 ± 0.2525.6826.1541.10 ± 0.10
crabz -d -p 16 -f bgzf ./data.txt.gz > ./data.out.txt5.663 ± 0.2405.5065.9391.06 ± 0.09
bgzip -d -c -@ 16 ./data.txt.gz > ./data.out.txt5.534 ± 0.1245.4165.6631.03 ± 0.08

TODOs