packagetar
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=f3d6b0d677fd40fd1eb80bccc60bb613220358be58f66c5fa8bf0257f3e5eb96
sha512=be23a0337f1334b9ead1516745f1397afd240787bb983f037ea33434eea7f0c9dedf2e53ebd1b47a076220cac9d926370d1b8d2b329d1e16d02b9b0e517dd162
Description
tar is a library to read and write tar files with an emphasis onstreaming.
This is pure OCaml code, no C bindings.
README
tar — decode and encode tar files
tar is a simple library to read and write tar files with an emphasis on streaming.
This is pure OCaml code, no C bindings.
Installation
tar
can be installed withopam
:
opam install taropam install tar-unix # for use in Unix/Lwtopam install tar-mirage # for use in MirageOS
If you don't useopam
consult thetar.opam
file for build instructions.
Example toplevel session
In utop:
utop # #require "tar";;utop # #require "tar-unix";;utop # let f = Lwt_unix.openfile "/tmp/foo.tar" [ Unix.O_RDONLY ] 0;;val f : Lwt_unix.file_descr = <abstr>utop # Lwt.bind f Tar_lwt_unix.Archive.list;;[{Tar.Header.file_name = "_build/lib/tar.mli.depends"; Tar.Header.file_mode = 420; Tar.Header.user_id = 1000; Tar.Header.group_id = 1000; Tar.Header.file_size = 21L; Tar.Header.mod_time = 1381080315L; Tar.Header.link_indicator = Tar.Header.Link.Normal; Tar.Header.link_name = ""}; {Tar.Header.file_name = "_build/lib/tar_unix.mli.depends"; Tar.Header.file_mode = 420; Tar.Header.user_id = 1000; Tar.Header.group_id = 1000; Tar.Header.file_size = 27L; Tar.Header.mod_time = 1381080318L; Tar.Header.link_indicator = Tar.Header.Link.Normal; Tar.Header.link_name = ""}; {Tar.Header.file_name = "_build/lib/tar.mllib"; Tar.Header.file_mode = ...; Tar.Header.user_id = ...; Tar.Header.group_id = ...; Tar.Header.file_size = ...; Tar.Header.mod_time = ...; Tar.Header.link_indicator = ...; Tar.Header.link_name = ...}; ...]
Compressedtarball
The distribution gives a small implementation to create atarball, a compressed archive. The software allows to list the contents of a given tarball. The compression is done withdecompress. You can look at the project documentation for more information on how to compress.
Alternatively, it is possible to use theTar_gz
module which offers the same interface asTar
with compression.
Example users
This library is used by
Documentation
The documentation and API reference is automatically generated byodoc
from the interfaces. It can be consultedonline.
Dependencies (3)
- decompress
>= "1.5.1"
- ocaml
>= "4.08.0"
- dune
>= "2.9"
Dev Dependencies (1)
- odoc
with-doc
Used by (9)
- builder-web
>= "0.2.0"
- gptar
- octez-shell-libs
- octez-smart-rollup-node-lib
>= "19.0"
- tar-eio
>= "3.3.0"
- tar-mirage
>= "3.3.0"
- tar-unix
>= "3.3.0"
- tezos-store
- vpnkit
Conflicts
None