JSPM

jsz85

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q61072F

jsZ85 provides an implementation of the Z85 codec following the specs of https://rfc.zeromq.org/spec/32/. It is a port of the https://github.com/ruben-viscomi/ktZ85 implementation for Kotlin.

Package Exports

  • jsz85
  • jsz85/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsz85) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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!