Encoder

Encoder.

class Encoder {}

Members

Manifest constants

DEFAULT_BYTE_MODE_ECODING
enum DEFAULT_BYTE_MODE_ECODING;

Default byte encoding.

Static functions

append8BitBytes
void append8BitBytes(string content, ref BitArray bits, string encoding)

Appends regular 8-bit bytes to a bit array.

appendAlphanumericBytes
void appendAlphanumericBytes(string content, BitArray bits)

Appends alpha-numeric bytes to a bit array.

appendBytes
void appendBytes(string content, Mode mode, ref BitArray bits, string encoding)

Appends bytes to a bit array in a specific mode.

appendEci
void appendEci(CharacterSetEci eci, ref BitArray bits)

Appends ECI information to a bit array.

appendKanjiBytes
void appendKanjiBytes(string content, BitArray bits)

Appends KANJI bytes to a bit array.

appendLengthInfo
void appendLengthInfo(int numLetters, QrCodeVersion _version, Mode mode, ref BitArray bits)

Appends length information to a bit array.

appendModeInfo
void appendModeInfo(Mode mode, ref BitArray bits)

Appends mode information to a bit array.

appendNumericBytes
void appendNumericBytes(string content, BitArray bits)

Appends numeric bytes to a bit array.

calculateMaskPenalty
int calculateMaskPenalty(ByteMatrix matrix)

Calculates the mask penalty for a matrix.

chooseMaskPattern
int chooseMaskPattern(BitArray bits, ErrorCorrectionLevel ecLevel, QrCodeVersion _version, ref ByteMatrix matrix)

Chooses the best mask pattern for a matrix.

chooseMode
Mode chooseMode(string content, string encoding = string.init)

Chooses the best mode for a given content.

chooseVersion
QrCodeVersion chooseVersion(BitArrayBitType numInputBits, ErrorCorrectionLevel ecLevel)

Chooses the best version for the input.

encode
QrCode encode(string content, ErrorCorrectionLevel ecLevel, string encoding = DEFAULT_BYTE_MODE_ECODING)

Encodes "content" with the error correction level "ecLevel".

generateEcBytes
int[] generateEcBytes(int[] dataBytes, int numEcBytesInBlock)

Generates EC bytes for given data.

getAlphanumericCode
int getAlphanumericCode(int code)

Gets the alphanumeric code for a byte.

getCodec
ReedSolomonCodec getCodec(int numDataBytes, int numEcBytesInBlock)

Gets an RS codec and caches it.

getNumDataBytesAndNumEcBytesForBlockId
int[] getNumDataBytesAndNumEcBytesForBlockId(int numTotalBytes, int numDataBytes, int numRsBlocks, int blockId)

Gets number of data- and EC bytes for a block ID.

interleaveWithEcBytes
BitArray interleaveWithEcBytes(ref BitArray bits, int numTotalBytes, int numDataBytes, int numRsBlocks)

Interleaves data with EC bytes.

terminateBits
void terminateBits(int numDataBytes, ref BitArray bits)

Terminates the bits in a bit array.

Static variables

alphanumericTable
int[] alphanumericTable;

The original table is defined in the table 5 of JISX0510:2004 (p.19).

Meta