0.1.2 • Published 1 year ago

base45nt v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Base45 NT

A Typescript implementation of the Base45 encoding as described in RFC 9285

Why?

Most Base45 implementations I found used NodeJS Buffer, which is not available in browsers. Also I wanted to try to code my own.

How?

Use the decode and encode functions defined in the library. They turn Uint8Arrays into Base45 encoded strings and vice versa

import { encode, decode } from 'base45nt'

const bytes = new Uint8Array([1, 2, 3])
const base45 = encode(bytes)
console.log(base45) // -> "X5030"
const bytesAgain = decode(base45)
console.log(bytesAgain.toString()) // -> "1,2,3"
0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago