Socket
Book a DemoInstallSign in
Socket

git-list-pack

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-list-pack

create a readable stream of a packfile's contents, sans an index file

latest
Source
npmnpm
Version
0.0.10
Version published
Maintainers
1
Created
Source

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

Keywords

git

FAQs

Package last updated on 27 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts