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!