tar-buffer
Buffers entries from a tar.Parse() stream into memory.
Usage
var fs = ;var zlib = ;var tar = ;var TarBuffer = ;var parser = tar;var buffer = parser;//// Read our tarball and pipe it to the tar parser.//fs;
API
Options
log
: (optional) Log function to use. Expectsconsole.log
API.ignore
: (optional) Array (or/\r?\n/
delimted string) of ignorefile lines.strip
: (optional) Number of preceding segments of an entry path to strip.maxSize
: (optional) Maximum number of bytes in a single file to buffer.
Events
entry
: similar theentry
events emitted by thetar.Parse()
stream except that these entries have been fully read into memory. The contents are located one.content
:
var buffer = parser;
Why isn't this a proper stream?
Underneath the covers, tar
emits several events, not just data
events which have to be handled seprately from a traditional stream.