Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dcsunset/hex-stream

Simple hex encoder and decoder stream in node.js
https://github.com/dcsunset/hex-stream

decoder encoder hex nodejs stream

Last synced: 3 days ago
JSON representation

Simple hex encoder and decoder stream in node.js

Awesome Lists containing this project

README

        

# hex-stream

Simple hex encoder and decoder stream in node.js

## Install

```
npm install hex-stream
```

## Usage

A simple demo to convert input from stdin to hex encoded string in `data.txt`:

```js
const { HexEncoder, HexDecoder } = require('hex-stream');
const fs = require('fs');
const fsStream = fs.createWriteStream('./data.txt');

process.stdin
.pipe(new HexEncoder())
.pipe(fsStream);
```