libarchive: Haskell interface to libarchive

[ bsd3, codec ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
cross

Set this flag if cross-compiling

Disabled
Automatic Flags
NameDescriptionDefault
low-memory

Run low-memory version of test suite

Disabled
system-libarchive

Use libarchive found with pkg-config rather than the bundled sources

Enabled
no-exe

don't install the archive executables

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.2.1.1, 0.2.1.2, 1.0.0.0, 1.0.1.0, 1.0.2.0, 1.0.3.0, 1.0.4.0, 1.0.5.0, 1.0.5.1, 2.0.0.0, 2.0.0.1, 2.0.0.2, 2.1.0.0, 2.1.0.1, 2.1.1.0, 2.1.2.0, 2.1.2.1, 2.1.3.0, 2.1.3.1, 2.1.3.2, 2.2.0.0, 2.2.0.1, 2.2.0.2, 2.2.1.0, 2.2.2.0, 2.2.3.0, 2.2.4.0, 2.2.5.0, 2.2.5.1, 2.2.5.2, 3.0.0.0, 3.0.1.1, 3.0.2.0, 3.0.2.1, 3.0.2.2, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.4.1, 3.0.4.2 (info)
Change log CHANGELOG.md
Dependencies base (>=4.8 && <5), bytestring (>=0.9), bzlib (>=0.4 && <0.7), composition-prelude (>=2.0.5.0), deepseq (>=1.4.0.0), directory (>=1.0), dlist, exceptions, filepath (>=1.0), libarchive, lzma-static, mtl (>=2.2.1), semigroups, time, transformers, unbuildable (<0), unix-compat (>=0.1.2.1), zlib (>=0.6.2.2 && <0.7) [details]
License BSD-3-Clause
Copyright Copyright: (c) 2018-2020 Vanessa McHale
Author Vanessa McHale
Maintainer vamchale@gmail.com
Category Codec
Bug tracker https://github.com/vmchale/libarchive/issues
Source repo head: git clone https://github.com/vmchale/libarchive
Uploaded by vmchale at 2023-09-07T18:34:30Z
Distributions NixOS:3.0.4.2
Reverse Dependencies 4 direct, 1 indirect [details]
Executables archive
Downloads 20136 total (136 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for libarchive-3.0.4.2

[back to package description]

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)