cel committed Add license textLatest: 0aede75 on 1/7/2020, 1:11:13 AM | |
📄 | .travis.yml |
📄 | LICENSE |
📄 | README.md |
📄 | idxoffset.js |
📄 | index.js |
📄 | package.json |
📄 | packidx.js |
📁 | test |
README.md
pull-git-packidx-parser
parse a git pack index file
currently only supports v2 idx files.
Forked from https://github.com/chrisdickinson/git-packidx-parser/
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
Built with git-ssb-web