Home

Awesome

base65536-stream

Streaming implementation of the Base65536 encoding.

Installation

npm install base65536-stream

Example usage

import { EncodeStream, DecodeStream } from 'base65536-stream'

if (process.argv[2] === '--decode') {
  process.stdin
    .setEncoding('utf8') // convert incoming binary data to text
    .pipe(new DecodeStream())
    .pipe(process.stdout)
} else {
  process.stdin
    .pipe(new EncodeStream())
    .pipe(process.stdout)
}

API

EncodeStream

Subclass of Transform which encodes binary data as Base65536 text.

DecodeStream

Subclass of Transform which decodes Base65536 string data to binary.