Options
All
  • Public
  • Public/Protected
  • All
Menu

The main class which implements Aztec Code decoding -- as opposed to locating and extracting the Aztec Code from an image.

author

David Olivier

Hierarchy

  • Decoder

Index

Properties

Private ddata

Static Private DIGIT_TABLE

DIGIT_TABLE: string[] = ['CTRL_PS', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',', '.', 'CTRL_UL', 'CTRL_US']

Static Private LOWER_TABLE

LOWER_TABLE: string[] = ['CTRL_PS', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p','q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'CTRL_US', 'CTRL_ML', 'CTRL_DL', 'CTRL_BS']

Static Private MIXED_TABLE

MIXED_TABLE: string[] = [// Module parse failed: Octal literal in strict mode (50:29)// so number string were scaped'CTRL_PS', ' ', '\\1', '\\2', '\\3', '\\4', '\\5', '\\6', '\\7', '\b', '\t', '\n','\\13', '\f', '\r', '\\33', '\\34', '\\35', '\\36', '\\37', '@', '\\', '^', '_','`', '|', '~', '\\177', 'CTRL_LL', 'CTRL_UL', 'CTRL_PL', 'CTRL_BS']

Static Private PUNCT_TABLE

PUNCT_TABLE: string[] = ['', '\r', '\r\n', '. ', ', ', ': ', '!', '"', '#', '$', '%', '&', '\'', '(', ')','*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '[', ']', '{', '}', 'CTRL_UL']

Static Private UPPER_TABLE

UPPER_TABLE: string[] = ['CTRL_PS', ' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P','Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'CTRL_LL', 'CTRL_ML', 'CTRL_DL', 'CTRL_BS']

Methods

Private correctBits

  • correctBits(rawbits: boolean[]): boolean[]
  • Performs RS error correction on an array of bits.

    throws

    FormatException if the input contains too many errors

    Parameters

    • rawbits: boolean[]

    Returns boolean[]

    the corrected array

decode

Private extractBits

Private totalBitsInLayer

  • totalBitsInLayer(layers: number, compact: boolean): number

Static convertBoolArrayToByteArray

  • convertBoolArrayToByteArray(boolArr: boolean[]): Uint8Array

Static Private getCharacter

  • getCharacter(table: Table, code: number): string
  • Gets the character (or string) corresponding to the passed code in the given table

    Parameters

    • table: Table

      the table used

    • code: number

      the code of the character

    Returns string

Static Private getEncodedData

  • getEncodedData(correctedBits: boolean[]): string

Static Private getTable

  • getTable(t: string): Table

Static highLevelDecode

  • highLevelDecode(correctedBits: boolean[]): string

Static Private readByte

  • readByte(rawbits: boolean[], startIndex: number): number

Static Private readCode

  • readCode(rawbits: boolean[], startIndex: number, length: number): number
  • Reads a code of given length and at given index in an array of bits

    Parameters

    • rawbits: boolean[]
    • startIndex: number
    • length: number

    Returns number

Generated using TypeDoc