MyNixOS website logo
Description

Haskell interface to libarchive.

Haskell bindings for libarchive. Provides the ability to unpack archives, including the ability to unpack archives lazily.

libarchive

Hackage CI Hackage Dependencies of latest version on Hackage

This contains Haskell bindings to libarchive. It was created as an alternative to tar and tar-conduit, but it supports more archive formats.

It has a high-level Haskell API for creating and unpacking archives in addition to the C API. Like the tar package, it can stream from lazy ByteStrings.

Hacking

To run the test suite, first run

make

to download test data.

Performance

libarchive is faster than tar or tar-conduit when unpacking archives.

benchmarking roundtrip/libarchive
time                 248.5 μs   (247.0 μs .. 250.0 μs)
                     0.999 R²   (0.999 R² .. 1.000 R²)
mean                 249.7 μs   (248.2 μs .. 251.6 μs)
std dev              5.637 μs   (4.385 μs .. 8.012 μs)
variance introduced by outliers: 15% (moderately inflated)

benchmarking roundtrip/tar
time                 322.7 μs   (321.9 μs .. 323.7 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 324.0 μs   (322.9 μs .. 325.1 μs)
std dev              3.673 μs   (2.837 μs .. 5.119 μs)

benchmarking unpack/libarchive (via bytestring)
time                 1.146 ms   (1.133 ms .. 1.157 ms)
                     0.999 R²   (0.997 R² .. 0.999 R²)
mean                 1.110 ms   (1.096 ms .. 1.156 ms)
std dev              72.18 μs   (30.15 μs .. 141.7 μs)
variance introduced by outliers: 51% (severely inflated)

benchmarking unpack/libarchive (C API)
time                 1.009 ms   (994.1 μs .. 1.022 ms)
                     0.999 R²   (0.997 R² .. 1.000 R²)
mean                 1.002 ms   (999.0 μs .. 1.006 ms)
std dev              11.81 μs   (8.603 μs .. 18.76 μs)

benchmarking unpack/tar
time                 3.600 ms   (3.271 ms .. 4.001 ms)
                     0.939 R²   (0.898 R² .. 0.977 R²)
mean                 4.119 ms   (3.814 ms .. 5.295 ms)
std dev              1.631 ms   (541.5 μs .. 3.272 ms)
variance introduced by outliers: 98% (severely inflated)

benchmarking unpack/tarConduit
time                 4.946 ms   (4.072 ms .. 6.308 ms)
                     0.835 R²   (0.779 R² .. 0.988 R²)
mean                 4.164 ms   (3.967 ms .. 4.574 ms)
std dev              848.0 μs   (442.7 μs .. 1.620 ms)
variance introduced by outliers: 88% (severely inflated)
Metadata

Version

3.0.4.2

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