public class Ascii85
extends java.lang.Object
An ASCII85 string encodes a sequence of bytes by taking the byte data 4 bytes at a time and factoring it into modulo-85 chunks, and then converting the modulos into printable US-ASCII characters, where modulo=0 -> '!', modulo=1 -> '"', etc., up to modulo=84 -> 'u' through the US-ASCII character set. 'z' is reserved to handle the special case of a 4-byte block that is all zero.
For more information, see https://en.wikipedia.org/wiki/Ascii85 for a description of the encoding algorithm.
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(java.lang.String enc)
Decode a String in ASCII-85 encoding into a byte array
|
static java.lang.String |
encode(byte[] sequence)
Encode a byte array into an ASCII-85-encoded string.
|
public static java.lang.String encode(byte[] sequence)
sequence
- byte array to encodepublic static byte[] decode(java.lang.String enc)
enc
- encoded String