Skip to content

qntm/base65536-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Streaming implementation of the Base65536 encoding

Resources

License

Stars

Watchers

Forks

Packages

No packages published