Comparing version
{ | ||
"name": "ascii85", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"engines" : { | ||
@@ -5,0 +5,0 @@ "node" : ">=0.12" |
@@ -7,3 +7,3 @@ # Ascii85 (Base85) Encoding/Decoding # | ||
This node module can encode any binary string/buffer to an ascii85 `Buffer` and decode encoded string back to original data. | ||
This node module provides straight forward APIs to encode/decode data in ascii85 encoding. Both `string` and `Buffer` are accepted by `encode()` and `decode()` functions. The return value of both functions is a `Buffer` for better performance. | ||
@@ -20,6 +20,6 @@ ## Install ## | ||
var ascii85 = require('ascii85'); | ||
var str = ascii85.encode('easy'); | ||
var buf = ascii85.encode('easy'); | ||
str.toString() === 'ARTY*'; // true | ||
ascii85.decode(str).toString() === 'easy'; // true | ||
buf.toString() === 'ARTY*'; // true | ||
ascii85.decode(buf).toString() === 'easy'; // true | ||
``` | ||
@@ -37,3 +37,3 @@ | ||
See following sample for detail. | ||
Here is a sample. | ||
@@ -47,3 +47,3 @@ ```javascript | ||
// Provide an array of charaters to encode the string. | ||
// Provide an array of characters to encode the string. | ||
// The array must have 85 elements. It's useful to work | ||
@@ -55,3 +55,3 @@ // with a customized ascii85 encoding, e.g. ZeroMQ flavor. | ||
table: [...], // an array of characters to encode the string | ||
delimiter: false, // result will be sorrounded by '<~' and '~>' | ||
delimiter: false, // result will be surrounded by '<~' and '~>' | ||
groupSpace: false // group spaces by 'u' | ||
@@ -68,4 +68,5 @@ }); | ||
* Return a `Buffer` with decoded data. | ||
* Invalid characters are ignored silently. | ||
See following sample for detail. | ||
Here is a sample. | ||
@@ -72,0 +73,0 @@ ```javascript |
22180
0.6%120
0.84%