Class Base85Codec

Object
io.delta.kernel.internal.deletionvectors.Base85Codec

public final class Base85Codec extends Object
This implements Base85 using the 4 byte block aligned encoding and character set from Z85.
See Also:
  • Z85 encoding

    Taken from https://github.com/delta-io/delta/blob/master/spark/src/main/scala/org/apache/spark /sql/delta/util/Codec.scala

  • Field Details

    • ENCODED_UUID_LENGTH

      public static final int ENCODED_UUID_LENGTH
      See Also:
    • ENCODE_MAP

      public static final byte[] ENCODE_MAP
    • DECODE_MAP

      public static final byte[] DECODE_MAP
  • Constructor Details

    • Base85Codec

      public Base85Codec()
  • Method Details

    • decodeUUID

      public static UUID decodeUUID(String encoded)
      Decode a 16 byte UUID.
    • decodeBytes

      public static byte[] decodeBytes(String encoded, int outputLength)
      Decode an arbitrary byte array.

      Only `outputLength` bytes will be returned. Any extra bytes, such as padding added because the input was unaligned, will be dropped.

    • decodeAlignedBytes

      public static byte[] decodeAlignedBytes(String encoded)
      Decode an arbitrary byte array.

      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.

    • encodeUUID

      public static String encodeUUID(UUID id)
      Encode a 16 byte UUID.
    • encodeBytes

      public static String encodeBytes(byte[] input)
      Encode an arbitrary byte array.

      Unaligned input will be padded to a multiple of 4 bytes.