iya-sts
    Preparing search index...

    Class export=

    QR codes for the portal. A static utility class; it holds no state.

    Index
    • The data codewords a version holds at a level.

      Parameters

      • version: number

        1 to 40

      • level: number

        the level's table row

      Returns number

      the count

    • The Reed-Solomon generator polynomial of a degree, highest term implied.

      Parameters

      • degree: number

        the error correction codewords per block

      Returns number[]

      its coefficients

    • Encodes text as a QR code, in byte mode, in the smallest version that holds it at the level.

      Parameters

      • text: string

        what the code says

      • Optionallevel: string

        L, M (the default), Q or H

      • Optionalmask: number

        a mask to force (0 to 7), or none to choose by penalty

      Returns QrMatrix

      the matrix

    • GF(2^8) multiplication modulo x^8 + x^4 + x^3 + x^2 + 1.

      Parameters

      • x: number

        a byte

      • y: number

        a byte

      Returns number

      their product

    • The modules a version holds that are not function patterns.

      Parameters

      • version: number

        1 to 40

      Returns number

      the count, in bits

    • A block's error correction codewords.

      Parameters

      • data: number[]

        the block's data codewords

      • divisor: number[]

        the generator

      Returns number[]

      the remainder

    • A QR code as an inline SVG, with the four-module quiet zone the standard asks for.

      Parameters

      • text: string

        what the code says

      • Optionaloptions: { id?: string; label?: string; pixels?: number }

        pixels (the drawn width, 240 by default), id, label (its accessible name)

      Returns string

      the SVG markup

    • Text as UTF-8 bytes, which is what byte mode carries.

      Parameters

      • text: string

        the text

      Returns number[]

      the bytes