public final class Base85Codec
extends Object
Taken from https://github.com/delta-io/delta/blob/master/spark/src/main/scala/org/apache/spark /sql/delta/util/Codec.scala
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
DECODE_MAP |
static byte[] |
ENCODE_MAP |
static int |
ENCODED_UUID_LENGTH |
| Constructor and Description |
|---|
Base85Codec() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decodeAlignedBytes(String encoded)
Decode an arbitrary byte array.
|
static byte[] |
decodeBytes(String encoded,
int outputLength)
Decode an arbitrary byte array.
|
static java.util.UUID |
decodeUUID(String encoded)
Decode a 16 byte UUID.
|
static String |
encodeBytes(byte[] input)
Encode an arbitrary byte array.
|
static String |
encodeUUID(java.util.UUID id)
Encode a 16 byte UUID.
|
public static final int ENCODED_UUID_LENGTH
public static final byte[] ENCODE_MAP
public static final byte[] DECODE_MAP
public static java.util.UUID decodeUUID(String encoded)
public static byte[] decodeBytes(String encoded,
int outputLength)
Only `outputLength` bytes will be returned. Any extra bytes, such as padding added because the input was unaligned, will be dropped.
public static byte[] decodeAlignedBytes(String encoded)
Output may contain padding bytes, if the input was not 4 byte aligned. Use [[decodeBytes]] in that case and specify the expected number of output bytes without padding.
public static String encodeUUID(java.util.UUID id)
public static String encodeBytes(byte[] input)
Unaligned input will be padded to a multiple of 4 bytes.