Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FormatInformation

Encapsulates a QR Code's format information, including the data mask used and error correction level.

author

Sean Owen

see

DataMask

see

ErrorCorrectionLevel

Hierarchy

  • FormatInformation

Index

Constructors

Private constructor

Properties

Private dataMask

dataMask: number

Private errorCorrectionLevel

errorCorrectionLevel: ErrorCorrectionLevel

Static Private FORMAT_INFO_DECODE_LOOKUP

FORMAT_INFO_DECODE_LOOKUP: Int32Array[] = [Int32Array.from([0x5412, 0x00]),Int32Array.from([0x5125, 0x01]),Int32Array.from([0x5E7C, 0x02]),Int32Array.from([0x5B4B, 0x03]),Int32Array.from([0x45F9, 0x04]),Int32Array.from([0x40CE, 0x05]),Int32Array.from([0x4F97, 0x06]),Int32Array.from([0x4AA0, 0x07]),Int32Array.from([0x77C4, 0x08]),Int32Array.from([0x72F3, 0x09]),Int32Array.from([0x7DAA, 0x0A]),Int32Array.from([0x789D, 0x0B]),Int32Array.from([0x662F, 0x0C]),Int32Array.from([0x6318, 0x0D]),Int32Array.from([0x6C41, 0x0E]),Int32Array.from([0x6976, 0x0F]),Int32Array.from([0x1689, 0x10]),Int32Array.from([0x13BE, 0x11]),Int32Array.from([0x1CE7, 0x12]),Int32Array.from([0x19D0, 0x13]),Int32Array.from([0x0762, 0x14]),Int32Array.from([0x0255, 0x15]),Int32Array.from([0x0D0C, 0x16]),Int32Array.from([0x083B, 0x17]),Int32Array.from([0x355F, 0x18]),Int32Array.from([0x3068, 0x19]),Int32Array.from([0x3F31, 0x1A]),Int32Array.from([0x3A06, 0x1B]),Int32Array.from([0x24B4, 0x1C]),Int32Array.from([0x2183, 0x1D]),Int32Array.from([0x2EDA, 0x1E]),Int32Array.from([0x2BED, 0x1F]),]

See ISO 18004:2006, Annex C, Table C.1

Static Private FORMAT_INFO_MASK_QR

FORMAT_INFO_MASK_QR: number = 21522

Methods

equals

  • equals(o: Object): boolean

getDataMask

  • getDataMask(): number

getErrorCorrectionLevel

hashCode

  • hashCode(): number

Static decodeFormatInformation

  • decodeFormatInformation(maskedFormatInfo1: number, maskedFormatInfo2: number): FormatInformation
  • Parameters

    • maskedFormatInfo1: number

      format info indicator, with mask still applied

    • maskedFormatInfo2: number

      second copy of same info; both are checked at the same time to establish best match

    Returns FormatInformation

    information about the format it specifies, or {@code null} if doesn't seem to match any known pattern

Static Private doDecodeFormatInformation

  • doDecodeFormatInformation(maskedFormatInfo1: number, maskedFormatInfo2: number): FormatInformation

Static numBitsDiffering

  • numBitsDiffering(a: number, b: number): number

Generated using TypeDoc