pull-git-packidx-parser
v1.0.0
Published
git pack index file parser, pull-stream based
Downloads
28
Readme
pull-git-packidx-parser
parse a git pack index file
currently only supports v2 idx files.
var packidx = require('pull-git-packidx-parser')
var toPull = require('stream-to-pull-stream')
var pull = require('pull-stream')
pull(
toPull(fs.createReadStream('path/to/packidx')),
packidx(function(err, packidx) {
})
)
api
packidx(cb) -> packidx sink stream
return a sink stream that calls back a PackIDX
instance.
PackIDX#find(Buffer objectID) -> {offset object} | null
attempt to find objectID
in this index file. returns either an
offset object, or null
if the objectID
isn't present in this pack index.
if an offset object is returned, it'll look like so:
{ offset: number | {hi: number, lo: number}
, next: number | {hi: number, lo: number} | null }
license
MIT