# zlib-transform

> A zlib transform for the BOB streaming protocol.

Latest version **0.0.4** (published 2020-01-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install zlib-transform
pnpm add zlib-transform
yarn add zlib-transform
bun add zlib-transform
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2020-01-08 |
| First published | 2018-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jeremiah Senkpiel |
| Maintainers | fishrock123 |
| Keywords | BOB, bob, streams, stream, pull, zlib, transform, compress, compression |

## Links

- npm: https://www.npmjs.com/package/zlib-transform
- Repository: https://github.com/Fishrock123/zlib-transform
- Homepage: https://github.com/Fishrock123/zlib-transform#readme
- Issues: https://github.com/Fishrock123/zlib-transform/issues
- npm.io page: https://npm.io/package/zlib-transform

## Dependencies (1)

- [bob-streams](https://npm.io/package/bob-streams.md) ^0.4.2

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2020-01-08
- 0.0.3 — 2019-07-04
- 0.0.2 — 2019-07-04
- 0.0.1 — 2018-10-05
- 0.0.0 — 2018-07-20

## README

# Zlib Transform (BOB)

A zlib transform for the [BOB](https://github.com/Fishrock123/bob) streaming protocol.

## Usage

**Note**: This currently requires the `--expose-internals` Node.js flag & Node.js built from `master`.

```js
const ZlibTransform = require('zlib-transform')
new ZlibTransform(options, mode)
```

Implements a [BOB transform](https://github.com/Fishrock123/bob/blob/master/reference-buffered-transform.js) for doing zlib compression / decompression.

### Example

```js
const zlib = require('zlib')
const ZlibTransform = require('zlib-transform')

const transform = new ZlibTransform({}, zlib.constants.GZIP)
const source = new MyBOBSource()
const sink = new MyBOBSink()

sink.bindSource(transform.bindSource(source), error => {
  if (error)
    console.error('Stream returned error ->', error.stack)
  else {
    console.log('ok')
  }
})
```

See [test-basic](test/test-basic) for a good working example.

## License

[MIT Licensed](license) — _[Contributions via DCO 1.1](contributing.md#developers-certificate-of-origin)_

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