This is the cl-qrencode Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:22:35 2024 GMT+0.
cl-qrencode/cl-qrencode.asd
cl-qrencode/packages.lisp
cl-qrencode/utils/util.lisp
cl-qrencode/rs-ecc/galois.lisp
cl-qrencode/rs-ecc/bch-ecc.lisp
cl-qrencode/rs-ecc/rs-ecc.lisp
cl-qrencode/qrencode/modes.lisp
cl-qrencode/qrencode/qrspec.lisp
cl-qrencode/qrencode/input.lisp
cl-qrencode/qrencode/bstream.lisp
cl-qrencode/qrencode/codeword.lisp
cl-qrencode/qrencode/matrix.lisp
cl-qrencode/qrencode/mask.lisp
cl-qrencode/qrencode/encode.lisp
cl-qrencode/image/png.lisp
The main system appears first, followed by any subsystem dependency.
cl-qrencode
QR code 2005 encoder in Common Lisp
jnjcc at live.com
GPL
0.1.1
zpng
(system).
packages.lisp
(file).
utils
(module).
rs-ecc
(module).
qrencode
(module).
image
(module).
Modules are listed depth-first from the system components tree.
cl-qrencode/utils
packages.lisp
(file).
cl-qrencode
(system).
util.lisp
(file).
cl-qrencode/rs-ecc
utils
(module).
cl-qrencode
(system).
galois.lisp
(file).
bch-ecc.lisp
(file).
rs-ecc.lisp
(file).
cl-qrencode/qrencode
rs-ecc
(module).
cl-qrencode
(system).
modes.lisp
(file).
qrspec.lisp
(file).
input.lisp
(file).
bstream.lisp
(file).
codeword.lisp
(file).
matrix.lisp
(file).
mask.lisp
(file).
encode.lisp
(file).
cl-qrencode/image
qrencode
(module).
cl-qrencode
(system).
png.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-qrencode/cl-qrencode.asd
cl-qrencode/packages.lisp
cl-qrencode/utils/util.lisp
cl-qrencode/rs-ecc/galois.lisp
cl-qrencode/rs-ecc/bch-ecc.lisp
cl-qrencode/rs-ecc/rs-ecc.lisp
cl-qrencode/qrencode/modes.lisp
cl-qrencode/qrencode/qrspec.lisp
cl-qrencode/qrencode/input.lisp
cl-qrencode/qrencode/bstream.lisp
cl-qrencode/qrencode/codeword.lisp
cl-qrencode/qrencode/matrix.lisp
cl-qrencode/qrencode/mask.lisp
cl-qrencode/qrencode/encode.lisp
cl-qrencode/image/png.lisp
cl-qrencode/utils/util.lisp
utils
(module).
read-file-content
(function).
sdebug
(function).
undebug
(function).
cl-qrencode/rs-ecc/galois.lisp
rs-ecc
(module).
initialize-instance
(method).
galois
(class).
gf-add
(generic function).
gf-divide
(generic function).
gf-exp
(generic function).
gf-log
(generic function).
gf-multiply
(generic function).
gf-order
(reader method).
gf-power
(reader method).
gf-subtract
(generic function).
prime-poly
(reader method).
with-gf-accessors
(macro).
with-gf-arithmetics
(macro).
with-gf-shortcuts
(macro).
cl-qrencode/rs-ecc/bch-ecc.lisp
rs-ecc
(module).
bch%
(function).
bch*
(function).
bch-
(function).
bch-ecc
(generic function).
bch-ecc
(class).
bch-xor
(function).
format-ecc
(function).
poly-ash
(function).
poly-mod
(function).
poly-multiply
(function).
poly-substract
(function).
version-ecc
(function).
cl-qrencode/rs-ecc/rs-ecc.lisp
rs-ecc
(module).
initialize-instance
(method).
cl-qrencode/qrencode/modes.lisp
qrencode
(module).
byte-value
(function).
kanji-word-p
(function).
mode-indicator
(function).
qr-mode
(type).
starts-kanji-p
(function).
terminator
(function).
xor-subset-of
(function).
cl-qrencode/qrencode/qrspec.lisp
qrencode
(module).
*align-coord-table*
(special variable).
*char-count-indicator*
(special variable).
*codeword-capacity-table*
(special variable).
*ecc-blocks*
(special variable).
*ecc-codewords-table*
(special variable).
*ecc-level-indicator*
(special variable).
*mask-pattern-num*
(special variable).
*mask-pattern-reference*
(special variable).
align-centers
(function).
char-count-bits
(function).
codeword-capacity
(function).
data-words-capacity
(function).
ecc-block-nums
(function).
ecc-level
(type).
ecc-words-capacity
(function).
level->index
(function).
level-indicator
(function).
mask-condition
(function).
mask-pattern-ref
(function).
matrix-modules
(function).
minimum-version
(function).
mode->index
(function).
remainder-bits
(function).
valid-center-p
(function).
version-range
(function).
cl-qrencode/qrencode/input.lisp
qrencode
(module).
initialize-instance
(method).
matrix
(reader method).
(setf matrix)
(writer method).
analyse-alnum-mode
(generic function).
analyse-byte-mode
(generic function).
analyse-kanji-mode
(generic function).
analyse-numeric-mode
(generic function).
append-cur-byte
(generic function).
blocks
(reader method).
bstream
(reader method).
bytes
(reader method).
cur-byte
(reader method).
(setf cur-byte)
(writer method).
data-analysis
(generic function).
data-encoding
(generic function).
data-masking
(generic function).
ec-coding
(generic function).
ecc-blocks
(reader method).
every-unit-matches
(function).
level
(reader method).
message
(reader method).
mode
(reader method).
mode-analyse-func
(function).
module-placement
(generic function).
nunits-matches
(function).
qr-input
(class).
redo-data-analysis
(generic function).
segments
(reader method).
(setf segments)
(writer method).
select-init-mode
(function).
structure-message
(generic function).
validate-and-analysis
(generic function).
version
(reader method).
cl-qrencode/qrencode/bstream.lisp
qrencode
(module).
alnum->bstream
(function).
bstream->decimal
(function).
bstream-trans-func
(function).
byte->bstream
(function).
bytes-length
(function).
decimal->bstream
(function).
eci->bstream
(function).
final-digit-bits
(function).
group->decimal
(function).
kanji->bstream
(function).
kanji->decimal
(function).
kanji-bytes-length
(function).
numeric->bstream
(function).
pair->decimal
(function).
segment->bstream
(function).
segment-bstream-length
(function).
cl-qrencode/qrencode/codeword.lisp
qrencode
(module).
bstream->codewords
(function).
pad-codewords
(function).
padding-bits
(function).
take-data-in-turn
(function).
take-in-turn
(function).
cl-qrencode/qrencode/matrix.lisp
qrencode
(module).
alignment-patterns
(function).
bstream-placement
(function).
finder-patterns
(function).
format-information
(function).
function-patterns
(function).
make-matrix
(function).
make-modules-matrix
(function).
module-color
(type).
one-align-pattern
(function).
one-finder-pattern
(function).
paint-color-bit
(function).
paint-fcolor-bit
(function).
paint-square
(function).
raw-module-p
(function).
reserve-information
(function).
same-color-p
(function).
separator
(function).
symbol-character
(function).
timing-patterns
(function).
version-information
(function).
cl-qrencode/qrencode/mask.lisp
qrencode
(module).
dark-module-p
(function).
calc-run-length
(function).
choose-masking
(function).
copy-and-mask
(function).
encoding-module-p
(function).
evaluate-feature-1
(function).
evaluate-feature-123
(function).
evaluate-feature-2
(function).
evaluate-feature-3
(function).
mask-matrix
(function).
non-mask-module-p
(function).
reverse-module-color
(function).
cl-qrencode/qrencode/encode.lisp
qrencode
(module).
encode-symbol
(function).
encode-symbol-bytes
(function).
matrix
(reader method).
modules
(reader method).
print-object
(method).
qr-symbol
(class).
ascii->bytes
(function).
bytes->input
(function).
input->symbol
(function).
cl-qrencode/image/png.lisp
image
(module).
encode-png
(function).
encode-png-bytes
(function).
encode-png-stream
(function).
encode-png-bytes-stream
(function).
set-color
(function).
symbol->png
(function).
Packages are listed by definition order.
cl-qrencode
qrcode
common-lisp
.
dark-module-p
(function).
encode-png
(function).
encode-png-bytes
(function).
encode-png-stream
(function).
encode-symbol
(function).
encode-symbol-bytes
(function).
matrix
(generic reader).
(setf matrix)
(generic writer).
modules
(generic reader).
qr-symbol
(class).
read-file-content
(function).
sdebug
(function).
undebug
(function).
*align-coord-table*
(special variable).
*char-count-indicator*
(special variable).
*codeword-capacity-table*
(special variable).
*dbg-ids*
(special variable).
*ecc-blocks*
(special variable).
*ecc-codewords-table*
(special variable).
*ecc-level-indicator*
(special variable).
*mask-pattern-num*
(special variable).
*mask-pattern-reference*
(special variable).
align-centers
(function).
alignment-patterns
(function).
alnum->bstream
(function).
analyse-alnum-mode
(generic function).
analyse-byte-mode
(generic function).
analyse-kanji-mode
(generic function).
analyse-numeric-mode
(generic function).
append-cur-byte
(generic function).
ascii->bytes
(function).
bch%
(function).
bch*
(function).
bch-
(function).
bch-ecc
(generic function).
bch-ecc
(class).
bch-xor
(function).
blocks
(generic reader).
bstream
(generic reader).
bstream->codewords
(function).
bstream->decimal
(function).
bstream-placement
(function).
bstream-trans-func
(function).
byte->bstream
(function).
byte-value
(function).
bytes
(generic reader).
bytes->input
(function).
bytes-length
(function).
calc-run-length
(function).
char-count-bits
(function).
choose-masking
(function).
codeword-capacity
(function).
copy-and-mask
(function).
cur-byte
(generic reader).
(setf cur-byte)
(generic writer).
data-analysis
(generic function).
data-encoding
(generic function).
data-masking
(generic function).
data-words-capacity
(function).
dbg
(function).
decimal->bstream
(function).
ec-coding
(generic function).
ecc-block-nums
(function).
ecc-blocks
(generic reader).
ecc-level
(type).
ecc-poly
(generic function).
ecc-words-capacity
(function).
eci->bstream
(function).
encode-png-bytes-stream
(function).
encoding-module-p
(function).
evaluate-feature-1
(function).
evaluate-feature-123
(function).
evaluate-feature-2
(function).
evaluate-feature-3
(function).
every-unit-matches
(function).
final-digit-bits
(function).
finder-patterns
(function).
format-ecc
(function).
format-information
(function).
function-patterns
(function).
galois
(class).
gen-poly
(generic function).
gen-poly-gflog
(generic function).
gf-add
(generic function).
gf-divide
(generic function).
gf-exp
(generic function).
gf-log
(generic function).
gf-multiply
(generic function).
gf-order
(generic reader).
gf-power
(generic reader).
gf-subtract
(generic function).
gpoly
(generic reader).
group->decimal
(function).
input->symbol
(function).
kanji->bstream
(function).
kanji->decimal
(function).
kanji-bytes-length
(function).
kanji-word-p
(function).
level
(generic reader).
level->index
(function).
level-indicator
(function).
make-matrix
(function).
make-modules-matrix
(function).
mask-condition
(function).
mask-matrix
(function).
mask-pattern-ref
(function).
matrix-modules
(function).
message
(generic reader).
minimum-version
(function).
mode
(generic reader).
mode->index
(function).
mode-analyse-func
(function).
mode-indicator
(function).
module-color
(type).
module-placement
(generic function).
non-mask-module-p
(function).
numeric->bstream
(function).
nunits-matches
(function).
one-align-pattern
(function).
one-finder-pattern
(function).
pad-codewords
(function).
padding-bits
(function).
paint-color-bit
(function).
paint-fcolor-bit
(function).
paint-square
(function).
pair->decimal
(function).
poly-ash
(function).
poly-mod
(function).
poly-multiply
(function).
poly-substract
(function).
prime-poly
(generic reader).
qr-input
(class).
qr-mode
(type).
raw-module-p
(function).
redo-data-analysis
(generic function).
remainder-bits
(function).
reserve-information
(function).
reverse-module-color
(function).
rs%
(function).
rs*
(function).
rs-
(function).
rs-ecc
(class).
same-color-p
(function).
segment->bstream
(function).
segment-bstream-length
(function).
segments
(generic reader).
(setf segments)
(generic writer).
select-init-mode
(function).
separator
(function).
set-color
(function).
starts-kanji-p
(function).
structure-message
(generic function).
symbol->png
(function).
symbol-character
(function).
take-data-in-turn
(function).
take-in-turn
(function).
terminator
(function).
timing-patterns
(function).
valid-center-p
(function).
validate-and-analysis
(generic function).
version
(generic reader).
version-ecc
(function).
version-information
(function).
version-range
(function).
with-gf-accessors
(macro).
with-gf-arithmetics
(macro).
with-gf-shortcuts
(macro).
xor-subset-of
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
encode final qr symbol, unless you know what you are doing, leave MODE NIL
encode final qr symbol from BYTES list
# of Alignment Patterns, row/column coordinates of center modules.
Number of modules (as version increases, 4 modules added) A | Function pattern modules B | Format and Version information modules C | Data modules (A^2-B-C) | Data capacity codewords (bytes, including ecc codewords) | Remainder bits.
:level-l :level-m :level-q :level-h
shortcuts for gf-exp & gf-log, usage: (with-gf-accessors ((gfexp gf-exp)) *gf-instance* ...)
shortcuts for gf-add, gf-subtract, gf-multiply & gf-divide, usage: (with-gf-arithmetics ((gf+ gf-add)) *gf-instance* ...)
combined with-gf-accessors & with-gf-arithmetics, usage: (with-gf-shortcuts ((gflog gf-log)) ((gf* gf-multiply)) *gf-instance* ...)
list of all valid alignment pattern center modules under VERSION
convert bstream into codewords, as coefficients of the terms of a polynomial
2X4 module block for a regular symbol character. Regard the interleaved codeword sequence as a single bit stream, which is placed in the two module wide columns, alternately in the right and left modules, moving upwards or downwards according to DIRECTION, skipping function patterns, changing DIRECTION at the top or bottom of the symbol. The only exception is that no block should ever overlap the vertical timing pattern.
BYTE value under MODE
number of data characters under MODE
list of number of adjacent modules in same color
mask and evaluate using each mask pattern, choose the best mask result
codeword: data word + ecc word
make a new matrix and mask using MASK-IND for later evaluation
using NBITS bits to encode decimal DEC
# of ec codewords for each blk, # of blk 1, # of data words for blk 1, ...
TODO
modules belong to encoding region, excluding format & version information
(5 + i) adjacent modules in row/column in same color. (N1 + i) points, N1 = 3
block m * n of modules in same color. N2 * (m-1) * (n-1) points, N2=3
1:1:3:1:1 ration (dark:light:dark:light:dark) pattern in row/column, preceded or followed by light area 4 modules wide. N3 points, N3 = 40
if every unit of USZIE bytes (at most NUNITS unit) within BYTES matches MODE
the final one or two digits are converted to 4 or 7 bits respectively
digit groups of length NDIGITS (1, 2 or 3) to decimal
encode qr symbol from a qr-input
(kanji-p, kanji-range: {0, 1})
make a raw matrix according to VERSION
make a raw matrix with MODULES * MODULES elements
do not evaluate, just go ahead and mask MATRIX using MASK-IND mask pattern
minimum version that can hold NBYTES data words, or INIT-VERSION if bigger
put CUR-BYTE into MODE, and then look at following BYTES for new segment
(number of units that matches MODE, and mode for the first unmatched unit)
Paint one alignment pattern centered at (X, Y)
Paint one finder pattern starting from upleft (X, Y)
add pad codewords (after adding padding-bits) to fill data codeword capacity
add padding bits so that BSTREAM ends at a codeword boundary
Paint data color for MATRIX[I, J] according to BIT of {0, 1}
Paint function pattern color for MATRIX[I, J] according to BIT of {0, 1}
Paint a square of size N*N starting from upleft (X, Y) in MATRIX to COLOR
alnum pairs of length NUM (1 or 2) to decimal
shift left POLY by S
MSG % GEN, with REM remainders
multiply B on every element of POLY using OP
nothing has been done to MATRIX[I, J]
multiply B on every element of POLY under GF(2^8)
during QR symbol evaluation, :fdark & :dark are considered to be same
SEGMENT (:mode b0 b1 ...) to bit stream under VERSION
bit stream length of SEGMENT (:mode b0 b1 ...) under VERSION
optimization of bitstream length: select initial mode
(BYTES starts with kanji-p, kanji word value, kanji-range: {0, 1})
return the qr symbol written into a zpng:png object with PIXSIZE pixels for each module, and MARGIN pixels on all four sides
taking data words from each block (might have different length) in turn
taking codewords from each block (bound by minimum length) in turn
End of message
The alignment center module is not in Finder Patterns.
version information placement on two blocks of modules: bottom-left 3*6 block: [modules-11, modules-9] * [0, 5] top-right 6*3 block: [0, 5] * [modules-11, modules-9]
exclusive subset of first unit of BYTES.
as for unit, one byte for :numeric, :alnum; two bytes for :kanji
append CUR-BYTE of BYTES into SEGMENTS
do bch error correction under BCH(K+EC, K)
BYTES -> SEGMETS, switch bewteen modes as necessary to achieve the most efficient conversion of data
encode SEGMENTS into BSTREAM slot
mask MATRIX with best pattern, generate the final symbol
split BSTREAM into BLOCKS, do rs-ecc, and fill ECC-BLOCKS
2^POW under Galois Field GF
VALUE should be within range [0, 2^POW - 1]
write MSG-CODEWORDS into the raw (without masking) MATRIX
VERSION changed, reset CUR-BYTE and redo data analysis
interleaving BLOCKS and ECC-BLOCKS into MSG-CODEWORDS
adapt VERSION according to BYTES, and fill SEGMENTS slot
analyse-alnum-mode
.
analyse-byte-mode
.
analyse-kanji-mode
.
analyse-numeric-mode
.
append-cur-byte
.
blocks
.
bstream
.
bytes
.
(setf cur-byte)
.
cur-byte
.
data-analysis
.
data-encoding
.
data-masking
.
ec-coding
.
ecc-blocks
.
initialize-instance
.
level
.
(setf matrix)
.
matrix
.
message
.
mode
.
module-placement
.
redo-data-analysis
.
(setf segments)
.
segments
.
structure-message
.
validate-and-analysis
.
version
.
list of bytes to be encoded
list
:bytes
This slot is read-only.
version of qr symbol, adapted according to BYTES
1
:version
This slot is read-only.
cl-qrencode::ecc-level
:level-m
:ec-level
This slot is read-only.
if supplied, we force all BYTES to be under MODE,
therefore, unless you know exactly what you are doing, leave this NIL
(or null cl-qrencode::qr-mode)
:mode
mode
.
This slot is read-only.
index of BYTES during data analysis
0
list of list, of the form ((:mode1 byte ...) (:mode2 byte ...) ...)
list
list of 0-1 values after encoding SEGMENTS
list
This slot is read-only.
list of list, of the form ((codeword ...) (codeword ...) ...) after converting BSTREAM to codewords
list
This slot is read-only.
list of list, ec codewords corresponding to BLOCKS
list
This slot is read-only.
list of codewords from BLOCKS & ECC-BLOCKS, interleaving if neccessary
list
This slot is read-only.
raw QR code symbol (without masking) as matrix
Jump to: | (
A B C D E F G I K L M N O P R S T U V W X |
---|
Jump to: | (
A B C D E F G I K L M N O P R S T U V W X |
---|
Jump to: | *
B C E G K L M O P S V |
---|
Jump to: | *
B C E G K L M O P S V |
---|
Jump to: | B C E F G I M P Q R S T U |
---|
Jump to: | B C E F G I M P Q R S T U |
---|