Class HighLevelEncoder

java.lang.Object
com.google.zxing.aztec.encoder.HighLevelEncoder

public final class HighLevelEncoder extends Object
This produces nearly optimal encodings of text into the first-level of encoding used by Aztec code. It uses a dynamic algorithm. For each prefix of the string, it determines a set of encodings that could lead to this prefix. We repeatedly add a character and generate a new set of optimal encodings until we have read through the entire input.
  • Field Details

    • MODE_NAMES

      static final String[] MODE_NAMES
    • MODE_UPPER

      static final int MODE_UPPER
      See Also:
    • MODE_LOWER

      static final int MODE_LOWER
      See Also:
    • MODE_DIGIT

      static final int MODE_DIGIT
      See Also:
    • MODE_MIXED

      static final int MODE_MIXED
      See Also:
    • MODE_PUNCT

      static final int MODE_PUNCT
      See Also:
    • LATCH_TABLE

      static final int[][] LATCH_TABLE
    • CHAR_MAP

      private static final int[][] CHAR_MAP
    • SHIFT_TABLE

      static final int[][] SHIFT_TABLE
    • text

      private final byte[] text
    • charset

      private final Charset charset
  • Constructor Details

    • HighLevelEncoder

      public HighLevelEncoder(byte[] text)
    • HighLevelEncoder

      public HighLevelEncoder(byte[] text, Charset charset)
  • Method Details