MyNixOS website logo
Description

Haskell version of tar CLI utility.

Haskell implementation of the tar utility, backed by libarchive.

hstar

hstar is a command-line tool like tar, with several more features.

Use

To generate bash shell completions:

hstar --bash-completion-script hstar

Features

Unlike other tar implementations, hstar has the sanitize subcommand which converts a file into a pax-compatible archive and the lint subcommand which points out suspicious archives.

hstar can change the compression based on command-line flags, like bsdtar and arc (this feature is missing from GNU tar, busybox tar, and seemingly Schily tar).

Compression

hstar has near-parity with other command-line tar implementations with respect to compression support.

Programlzoplziplzmagzipbzip2zstdlz4brotlisnappylrzipgrzip
bsdtarxxxxxxxxx
hstarxxxxxxxxx½
arcxxxx½x
Schily tarxxxxxx
busybox tarxxx
python3 tar modulexxx
GNU tarxxxxxx

Performance

Benchmarks run on Linux. Performance should be near GNU tar, bsdtar, or Schily tar.

ProgramCompressionCommandTime
bsdtarzstdbsdtar -xf sparc64-linux-dist.tar.zst61.28 ms
hstarzstdhstar unpack sparc64-linux-dist.tar.zst69.63 ms
GNU tarzstdtar xf sparc64-linux-dist.tar.zst303.8 ms
Schily tarzstdstar xf sparc64-linux-dist.tar.zst291.0 ms
bsdtarlzipbsdtar -xf sparc64-linux-dist.tar.lz345.3 ms
hstarlziphstar unpack sparc64-linux-dist.tar.lz433.2 ms
GNU tarlziptar xf sparc64-linux-dist.tar.lz456.8 ms
Schily tarlzipstar xf sparc64-linux-dist.tar.lz440.0 ms
busybox tarlziplzip -cd sparc64-linux-dist.tar.lz | busybox tar xf -481.0 ms
busybox tarzstdzstd -cd sparc64-linux-dist.tar.zst | busybox tar xf -319.0 ms
python3 targzippython3 -m tarfile -e sparc64-linux-dist.tar.gz245.3 ms
bsdtargzipbsdtar -xf sparc64-linux-dist.tar.gz122.8 ms
hstargziphstar unpack sparc64-linux-dist.tar.gz172.4 ms
GNU targziptar xf sparc64-linux-dist.tar.gz233.9 ms
Schily targzipstar xf sparc64-linux-dist.tar.gz234.8 ms
arcgziparc -overwrite unarchive sparc64-linux-dist.tar.gz362.0 ms
python3 tarlzmapython3 -m tarfile -e sparc64-linux-dist.tar.xz414.9 ms
bsdtarlzmabsdtar -xf sparc64-linux-dist.tar.xz349.4 ms
hstarlzmahstar unpack sparc64-linux-dist.tar.xz360.6 ms
GNU tarlzmatar xf sparc64-linux-dist.tar.xz364.3 ms
Schily tarlzmastar xf sparc64-linux-dist.tar.xz353.6 ms
arclzmaarc -overwrite unarchive sparc64-linux-dist.tar.xz1.191 s
python3 tarbzip2python3 -m tarfile -e sparc64-linux-dist.tar.bz21.242 s
bsdtarbzip2bsdtar -xf sparc64-linux-dist.tar.bz21.149 s
hstarbzip2hstar unpack sparc64-linux-dist.tar.bz21.136 s
GNU tarbzip2tar xf sparc64-linux-dist.tar.bz21.092 s
Schily tarbzip2star xf sparc64-linux-dist.tar.bz21.103 s
arcbzip2arc -overwrite unarchive sparc64-linux-dist.tar.bz22.544 s
busybox targzipbusybox tar xzf sparc64-linux-dist.tar.gz307.5 ms
busybox tarbzip2busybox tar xjf sparc64-linux-dist.tar.bz21.018 s
busybox tarlzmabusybox tar xJf sparc64-linux-dist.tar.xz385.6 ms
bsdtarlz4bsdtar -xf sparc64-linux-dist.tar.lz440.69 ms
hstarlz4hstar unpack sparc64-linux-dist.tar.lz449.87 ms
busybox tarlz4lz4 -cd sparc64-linux-dist.tar.lz4 | busybox tar xf -56.00 ms
GNU tarlz4lz4 -cd sparc64-linux-dist.tar.lz4 | tar xf -39.19 ms
Schily tarlz4lz4 -cd sparc64-linux-dist.tar.lz4 | star xf -30.88 ms.
Metadata

Version

0.1.0.6

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows