[new release] tar (4 packages) (3.0.0) #26330
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Decode and encode tar format files in pure OCaml
CHANGES:
Fix
Header.marshal
and the checksum and the length (@reynir, Header.marshal, checksum: check length mirage/ocaml-tar#145)Delete a mutable field about the level into the header (@hannesm, remove ref to compatibility level mirage/ocaml-tar#141)
BREAKING: de-functorize the package (@hannesm, @reynir, @dinosaure, revise a decoder and encoder, being pure mirage/ocaml-tar#140, Pure dec enc with gz mirage/ocaml-tar#143, New tar gz mirage/ocaml-tar#146)
These PRs attempt to de-functorize
Tar
so that users can implement I/Othemselves, using
Tar
's own element serialization/deserialization functionsto take advantage of read/write methods. This avoids imposing on the user the
implementation of a module that is too rigid in his/her case (which could have
performance implications).
Tar
offers functions for serializing/deserializing tar-specific elementsfrom
string
. It is then up to the user to know how to obtain or write thesestrings
.To this, these PRs add "logics" (see
'a Tar.t
) requiring read and/or writeimplementations and describing how to extract all entries from a tar file or
how to write a tar file according to a "dispenser" (like
Seq.to_dispenser
)of entries.
These logics do not depend on a particular "scheduler", and these PRs propose
a derivation of these logics with
tar-unix
,tar-eio
andtar-mirage
.These latter derivations mean that the API for these packages has only been
extended, and there are no breaking changes as such.
These logics also make it easy to offer a compression/decompression layer with
decompress
, so you can easily manipulate and/or create a .tar.gz file.