# git-packidx-parser

> git pack index file parser

Latest version **1.0.0** (published 2016-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-packidx-parser
pnpm add git-packidx-parser
yarn add git-packidx-parser
bun add git-packidx-parser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-06-18 |
| First published | 2013-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Chris Dickinson |
| Maintainers | chrisdickinson |
| Keywords | git, packfile, packindex |

## Links

- npm: https://www.npmjs.com/package/git-packidx-parser
- Repository: https://github.com/chrisdickinson/git-packidx-parser
- Homepage: https://github.com/chrisdickinson/git-packidx-parser#readme
- Issues: https://github.com/chrisdickinson/git-packidx-parser/issues
- npm.io page: https://npm.io/package/git-packidx-parser

## Dependencies (1)

- [through](https://npm.io/package/through.md) ~2.2.7

## Recent versions

- 1.0.0 (latest) — 2016-06-18
- 0.0.4 — 2013-03-19
- 0.0.3 — 2013-03-19
- 0.0.2 — 2013-03-17
- 0.0.1 — 2013-03-17

## README

# git-packidx-parser

given a packfile, create a stream to parse it's index file.

currently only supports v2 idx files.

[![Build Status](https://travis-ci.org/chrisdickinson/git-packidx-parser.png)](https://travis-ci.org/chrisdickinson/git-packidx-parser)
[![browser support](http://ci.testling.com/chrisdickinson/git-packidx-parser.png)](http://ci.testling.com/chrisdickinson/git-packidx-parser)

```javascript

var packidx = require('git-packidx-parser')

fs.createReadStream('path/to/packidx')
  .pipe(packidx(<packfile>))
  .on('data', function(packidx) {

  })

```

## api

#### packidx() -> packidx stream

return a writable stream that emits a single `'data'` event containing 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:

```javascript
{ offset: number | {hi: number, lo: number}
, next: number | {hi: number, lo: number} | null }
```

## license

MIT

---
_Source: https://npm.io/package/git-packidx-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
