jsz85
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

jsZ85

jsZ85 provides an implementation of the Z85 codec following the zeromq rfc.

Examples

function getBytes(str: string): Uint8Array {
    return new TextEncoder().encode(str)
}

const toEncode = "Hello, World!";

// ENCODING EXAMPLE
const encoded = Z85.encode(getBytes(toEncode));
console.log(encoded); // Outputs: nm=QNz.92jz/PV8aP

// DECODING EXAMPLE
const decoded = Z85.decode(encoded);
console.log(String.fromCharCode(...decoded)); // Outputs: Hello, World!

Package Sidebar

Install

npm i jsz85

Weekly Downloads

4

Version

1.0.1

License

none

Unpacked Size

20.3 kB

Total Files

5

Last publish

Collaborators

  • ruben-viscomi