Options
All
  • Public
  • Public/Protected
  • All
Menu

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

author

bbrown@google.com (Brian Brown)

Hierarchy

  • Decoder

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private rsDecoder

Methods

Private correctErrors

  • correctErrors(codewordBytes: Uint8Array, numDataCodewords: number): void
  • Given data and error-correction codewords received, possibly corrupted by errors, attempts to correct the errors in-place using Reed-Solomon error correction.

    throws

    ChecksumException if error correction fails

    Parameters

    • codewordBytes: Uint8Array

      data and error correction codewords

    • numDataCodewords: number

      number of codewords that are data bytes

    Returns void

decode

  • Decodes a Data Matrix Code represented as a BitMatrix. A 1 or "true" is taken to mean a black module.

    throws

    FormatException if the Data Matrix Code cannot be decoded

    throws

    ChecksumException if error correction fails

    Parameters

    • bits: BitMatrix

      booleans representing white/black Data Matrix Code modules

    Returns DecoderResult

    text and bytes encoded within the Data Matrix Code

Generated using TypeDoc