ztar: Creating and extracting arbitrary archives

[ bsd3, codec, library ] [ Propose Tags ]

Creating and extracting arbitrary archives.


[Skip to Readme]

Modules

[Last Documentation]

  • Codec
    • Archive
      • Codec.Archive.Tar
      • Codec.Archive.ZTar
        • Codec.Archive.ZTar.GZip
        • Codec.Archive.ZTar.Tar
        • Codec.Archive.ZTar.Zip

Flags

Manual Flags

NameDescriptionDefault
dev

Turn on development settings.

Disabled

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

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 1.0.0, 1.0.1, 1.0.2
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), bytestring (>=0.10.8), deepseq, directory (>=1.3), filepath (>=1.4.1), path (>=0.5), process, text, unix-compat, zip (>=1.0), zlib (>=0.6) [details]
License BSD-3-Clause
Author Brandon Chinn <brandonchinn178@gmail.com>
Maintainer Brandon Chinn <brandonchinn178@gmail.com>
Revised Revision 1 made by brandonchinn178 at 2023-07-07T02:44:30Z
Category Codec
Home page https://github.com/brandonchinn178/ztar#readme
Bug tracker https://github.com/brandonchinn178/ztar/issues
Source repo head: git clone https://github.com/brandonchinn178/ztar
Uploaded by brandonchinn178 at 2020-05-03T21:13:31Z
Distributions NixOS:1.0.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4429 total (16 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2020-05-04 [all 2 reports]

Readme for ztar-1.0.2

[back to package description]

ztar

Reading and writing arbitrary archives.

An extension of the tar library that, similar to the tar UNIX executable, can create an archive with a given compression algorithm and automatically detect the compression algorithm of an archive when extracting.

import Codec.Archive.ZTar

-- equivalent to `Codec.Archive.Tar.create "archive.tar" "dist/" ["."]`
createFrom NoCompression "archive.tar" "dist/" ["."]

-- helper to compress a single directory; equivalent to previous line
create NoCompression "archive.tar" "dist/"

-- compress with GZip
create GZip "archive.tar.gz" "dist/"

-- compress with Zip
create Zip "archive.zip" "dist/"

-- automatically determines compression
extract "archive.tar" "archive-tar/"
extract "archive.tar.gz" "archive-gz/"
extract "archive.zip" "archive-zip/"

-- can also use Path types
import Path
import Path.IO
home <- getHomeDir
let archive = home </> [relfile|archive.tgz|]
dir <- resolveDir "dist/"
create' GZip archive dir