git-list-pack
create a readable stream of a packfile's contents, sans an index file
Last updated 12 years ago by chrisdickinson .
MIT · Repository · Original npm · Tarball · package.json
$ npm install git-list-pack 
SYNC missed versions from official npm registry.

git-list-pack

given a stream of packfile contents, emit the raw git objects contained within + their offsets.

note, this doesn't do the actual translation into real git objects, rather, it'll give you the inflated data that an object represents and its offset; likewise it skips actually applying deltas in the case of ofs and ref delta. other modules will do that.

var list = require('git-list-pack')

fs.createReadStream('path/to/file.pack')
  .pipe(list())
  .on('data', function(obj) {
    console.log(obj)
  })

API

list() -> pack list stream

create a through stream of pack objects.

"data" event

{ reference: Array | Buffer | null // if delta, reference will contain the relevant offset data.
, data: Buffer // the inflated data
, type: 1 | 2 | 3 | 4 | 6 | 7 // the packed git object type
, offset: Number // the offset into the packfile
, num: Number } // the number of the object from expected_objects -> 0

License

MIT

Current Tags

  • 0.0.10                                ...           latest (11 years ago)

10 Versions

  • 0.0.10                                ...           11 years ago
  • 0.0.9                                ...           11 years ago
  • 0.0.8                                ...           11 years ago
  • 0.0.7                                ...           12 years ago
  • 0.0.6                                ...           12 years ago
  • 0.0.5                                ...           12 years ago
  • 0.0.4                                ...           12 years ago
  • 0.0.3                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE