This is a very basic/alpha version of a JS Mac OSX xar implementation.
Pack a directory like:
var xar =xar
Compression formats supported:
Unpack a directory like:
var fs =xar
returns a readable stream
It is not possible to create the archive in a streaming fashion though, since it has a TOC in the beginning. The file is constructed in a tmp file, which is then streamed to you.
callback called for each file with
(err, file, content)
file is the parsed header from the TOC
Note that this is mainly made for testing the
pack function, if someone
wants to improve it, feel free to create a PR!