@alttiri/base85
Advanced tools
Comparing version 1.5.1 to 1.7.0
@@ -11,2 +11,4 @@ /** 85 unique characters string */ | ||
export function encode(ui8a: Uint8Array, charset?: "ascii85" | "z85" | CharSet): string | ||
/** Alias to encode. */ | ||
export function encodeBase85(ui8a: Uint8Array, charset?: "ascii85" | "z85" | CharSet): string | ||
@@ -21,5 +23,8 @@ /** | ||
/** Alias to decode. */ | ||
export function decodeBase85(base85: string, charset?: "ascii85" | "z85" | CharSet): Uint8Array | ||
type base85 = { | ||
encode, decode | ||
encode, decode, encodeBase85, decodeBase85 | ||
}; | ||
export default base85; |
@@ -122,3 +122,6 @@ const ascii85 = charsetToMap(`!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstu`); | ||
const base85 = {encode, decode}; | ||
export const encodeBase85 = encode; | ||
export const decodeBase85 = decode; | ||
const base85 = {encode, decode, encodeBase85, decodeBase85}; | ||
export default base85; |
{ | ||
"name": "@alttiri/base85", | ||
"version": "1.5.1", | ||
"version": "1.7.0", | ||
"description": "Pretty fast base85 JavaScript library", | ||
@@ -23,2 +23,6 @@ "author": "alttiri", | ||
}, | ||
"files": [ | ||
"base85.ts", | ||
"base85.d.ts" | ||
], | ||
"scripts": { | ||
@@ -28,3 +32,3 @@ "publish-npm": "npm publish --registry=https://registry.npmjs.org", | ||
"#": "", | ||
"unpublish-npm": "npm unpublish @alttiri/base85@1.4.3 --registry=https://registry.npmjs.org", | ||
"unpublish-npm": "npm unpublish @alttiri/base85@1.6.0 --registry=https://registry.npmjs.org", | ||
"##": "", | ||
@@ -31,0 +35,0 @@ "login-npm": "npm login --registry=https://registry.npmjs.org", |
@@ -22,2 +22,3 @@ # base85 | ||
Also, there are `encodeBase85` and `decodeBase85` aliases for `encode` and `decode` functions. | ||
@@ -31,3 +32,3 @@ ## Examples | ||
const imageBytes = new Uint8Array([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,2,0,0,0,252,24,237,163,0,0,0,1,115,82,71,66,0,174,206,28,233,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,9,112,72,89,115,0,0,14,195,0,0,14,195,1,199,111,168,100,0,0,0,62,73,68,65,84,72,75,237,210,49,10,0,48,8,197,80,239,127,105,187,252,161,208,150,32,93,243,86,149,44,86,191,213,33,131,9,3,200,0,50,128,12,160,92,74,63,242,77,55,217,216,100,48,97,0,25,64,6,144,1,208,189,0,183,189,228,126,66,93,37,1,0,0,0,0,73,69,78,68,174,66,96,130]); | ||
const base85 = encode(imageBytes); | ||
const base85 = encodeBase85(imageBytes); | ||
@@ -34,0 +35,0 @@ console.log(base85); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132
12029
5
135