Package ghidra.features.bsim.query.elastic

# Class Base64Lite

java.lang.Object
ghidra.features.bsim.query.elastic.Base64Lite

public class Base64Lite extends Object
Lightweight Base64 encoder for writing chars directly to StringBuilders and giving direct access to the encode and decode arrays

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int[]`
  `decode`
  `static final char[]`
  `encode`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Base64Lite()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static long`
  `decodeLongBase64(String val)`
  Decode (up to 11) base64 characters to produce a long
  `static String`
  `encodeLongBase64(long val)`
  Encode a long value in base64 to a String.
  `static void`
  `encodeLongBase64(StringBuilder buf, long val)`
  Encode a long value in base64 to a StringBuilder "stream".
  `static void`
  `encodeLongBase64Padded(StringBuilder buf, long val)`
  Encode a long value in base64 to the StringBuilder "stream" padding out with 'A' characters so that exactly 11 characters are always written to the stream

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### encode

    public static final char[] encode

  - ### decode

    public static final int[] decode

- ## Constructor Details

  - ### Base64Lite

    public Base64Lite()

- ## Method Details

  - ### encodeLongBase64

    public static void encodeLongBase64(StringBuilder buf, long val)
    Encode a long value in base64 to a StringBuilder "stream". Omit initial 'A' characters if the high-order bits of the value are zero
    Parameters:
      `buf` - is the buffer to write to
      `val` - is the long value to encode

  - ### encodeLongBase64Padded

    public static void encodeLongBase64Padded(StringBuilder buf, long val)
    Encode a long value in base64 to the StringBuilder "stream" padding out with 'A' characters so that exactly 11 characters are always written to the stream
    Parameters:
      `buf` - is the buffer to write to
      `val` - is the long value to encode

  - ### encodeLongBase64

    public static String encodeLongBase64(long val)
    Encode a long value in base64 to a String. Omit initial 'A' characters if the high-order bits of the value are zero
    Parameters:
      `val` - is the long to encode
    Returns:
      the encoded String

  - ### decodeLongBase64

    public static long decodeLongBase64(String val)
    Decode (up to 11) base64 characters to produce a long
    Parameters:
      `val` - is the String to decode
    Returns:
      the decode long