Extensible Archive Format
Install via npm
$ npm install --save xarchive
var xar = require( 'xarchive' )
var archive = new xar.Archive( 'something.xar' )
archive.open( function( error ) {
// ...
})
archive.readdir( '/', ( error, ls ) => {
console.log( error || ls )
})
[ 'file.txt', 'subdirectory' ]
Reading an entire file:
archive.readFile( 'file.txt', function( error, buffer ) {
// ...
})
Streaming from a file:
var readableStream = archive.createReadStream( 'file.txt' )