Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/skip2/go-qrcode
/ functions
Functions
143 in github.com/skip2/go-qrcode
⨍
Functions
143
◇
Types & classes
17
↓ 51 callers
Function
New
New returns an initialised Bitset with optional initial bits v.
bitset/bitset.go:43
↓ 19 callers
Method
Len
Len returns the length of the Bitset in bits.
bitset/bitset.go:210
↓ 16 callers
Method
Bits
Bits returns the contents of the Bitset.
bitset/bitset.go:215
↓ 16 callers
Function
New
New constructs a QRCode. var q *qrcode.QRCode q, err := qrcode.New("my content", qrcode.Medium) An error occurs if the content is too long.
qrcode.go:156
↓ 16 callers
Method
numTerms
numTerms returns the number of
reedsolomon/gf_poly.go:68
↓ 16 callers
Method
string
(useIndexForm bool)
reedsolomon/gf_poly.go:162
↓ 15 callers
Method
String
String returns a human readable representation of the Bitset's contents.
bitset/bitset.go:192
↓ 15 callers
Method
set
set sets the module at (x, y) to v.
symbol.go:94
↓ 14 callers
Method
At
At returns the value of the bit at |index|.
bitset/bitset.go:227
↓ 13 callers
Method
get
get returns the module value at (x, y).
symbol.go:65
↓ 11 callers
Method
AppendBools
AppendBools appends bits to the Bitset.
bitset/bitset.go:173
↓ 11 callers
Method
set2dPattern
set2dPattern sets a 2D array of modules, starting at (x, y).
symbol.go:100
↓ 8 callers
Method
AppendUint32
AppendUint32 appends the numBits least significant bits from value.
bitset/bitset.go:123
↓ 8 callers
Function
gfMultiply
gfMultiply returns a * b.
reedsolomon/gf2_8.go:97
↓ 8 callers
Function
newDataEncoder
newDataEncoder constructs a dataEncoder.
encoder.go:118
↓ 7 callers
Function
NewFromBase2String
NewFromBase2String constructs and returns a Bitset from a string. The string consists of '1', '0' or ' ' characters, e.g. "1010 0101". The '1' and '0'
bitset/bitset.go:80
↓ 6 callers
Method
encodedLength
encodedLength returns the number of bits required to encode n symbols in dataMode. The number of bits required is affected by: - QR code type - Mode
encoder.go:416
↓ 6 callers
Function
equal
(a []bool, b []bool)
bitset/bitset_test.go:210
↓ 6 callers
Method
equals
equals returns true if e == other.
reedsolomon/gf_poly.go:188
↓ 6 callers
Method
numDataBits
numDataBits returns the data capacity in bits.
version.go:2950
↓ 5 callers
Method
Append
Append bits copied from |other|. The new length is b.Len() + other.Len().
bitset/bitset.go:161
↓ 5 callers
Method
Equals
Equals returns true if the Bitset equals other.
bitset/bitset.go:236
↓ 5 callers
Method
PNG
PNG returns the QR Code as a PNG image. size is both the image width and height in pixels. If size is too small then a larger image is silently retur
qrcode.go:339
↓ 5 callers
Method
encode
encode completes the steps required to encode the QR Code. These include adding the terminator bits and padding, splitting the data into blocks and ap
qrcode.go:391
↓ 5 callers
Method
ensureCapacity
ensureCapacity ensures the Bitset can store an additional |numBits|. The underlying array is expanded if necessary. To prevent frequent reallocation,
bitset/bitset.go:143
↓ 5 callers
Function
getQRCodeVersion
getQRCodeVersion returns the QR Code version by version number and recovery level. Returns nil if the requested combination is not defined.
version.go:3042
↓ 5 callers
Function
zbarimgCheck
(q *QRCode)
qrcode_decode_test.go:175
↓ 4 callers
Method
AppendByte
AppendByte appends the numBits least significant bits from value.
bitset/bitset.go:106
↓ 4 callers
Method
AppendNumBools
AppendNumBools appends num bits of value value.
bitset/bitset.go:185
↓ 4 callers
Method
Substr
Substr returns a substring, consisting of the bits from indexes start to end.
bitset/bitset.go:56
↓ 4 callers
Method
WriteFile
WriteFile writes the QR Code as a PNG image to the specified file. size is both the image width and height in pixels. If size is too small then a lar
qrcode.go:376
↓ 4 callers
Function
checkError
(err error)
qrcode/main.go:85
↓ 4 callers
Method
empty
empty returns true if the module at (x, y) has not been set (to either true or false).
symbol.go:72
↓ 4 callers
Function
gfPolyMultiply
gfPolyMultiply returns a * b.
reedsolomon/gf_poly.go:73
↓ 3 callers
Function
gfDivide
gfDivide returns a / b. Divide by zero results in a panic.
reedsolomon/gf2_8.go:108
↓ 3 callers
Function
gfPolyAdd
gfPolyAdd returns a + b.
reedsolomon/gf_poly.go:116
↓ 3 callers
Function
newSymbol
newSymbol constructs a symbol of size size*size, with a border of quietZoneSize.
symbol.go:46
↓ 3 callers
Method
normalised
()
reedsolomon/gf_poly.go:141
↓ 2 callers
Method
Bitmap
Bitmap returns the QR Code as a 2D array of 1-bit pixels. bitmap[y][x] is true if the pixel at (x, y) is set. The bitmap includes the required "quie
qrcode.go:266
↓ 2 callers
Method
ByteAt
ByteAt returns a byte consisting of upto 8 bits starting at index.
bitset/bitset.go:258
↓ 2 callers
Function
Encode
Encode data for QR Code 2005 using the appropriate Reed-Solomon code. numECBytes is the number of error correction bytes to append, and is determined
reedsolomon/reed_solomon.go:26
↓ 2 callers
Method
Write
Write writes the QR Code as a PNG image to io.Writer. size is both the image width and height in pixels. If size is too small then a larger image is
qrcode.go:359
↓ 2 callers
Method
bitmap
bitmap returns the entire symbol, including the quiet zone.
symbol.go:109
↓ 2 callers
Function
buildRegularSymbol
(version qrCodeVersion, mask int, data *bitset.Bitset, includeQuietZone bool)
regular_symbol.go:107
↓ 2 callers
Method
charCountBits
charCountBits returns the number of bits used to encode the length of a data segment of type dataMode.
encoder.go:390
↓ 2 callers
Function
dataModeString
dataModeString returns d as a short printable string.
encoder.go:59
↓ 2 callers
Method
encode
encode data as one or more segments and return the encoded data. The returned data does not include the terminator bit sequence.
encoder.go:165
↓ 2 callers
Method
encodeDataRaw
encodeDataRaw encodes data in dataMode. The encoded data is appended to encoded.
encoder.go:322
↓ 2 callers
Method
formatInfo
formatInfo returns the 15-bit Format Information value for a QR code.
version.go:2905
↓ 2 callers
Function
gfInverse
gfInverse returns the multiplicative inverse of a, a^-1. a * a^-1 = 1
reedsolomon/gf2_8.go:121
↓ 2 callers
Function
gfPolyRemainder
gfPolyRemainder return the remainder of numerator / denominator.
reedsolomon/gf_poly.go:94
↓ 2 callers
Method
modeIndicator
modeIndicator returns the segment header bits for a segment of type dataMode.
encoder.go:373
↓ 2 callers
Function
newGFPolyMonomial
newGFPolyMonomial returns term*(x^degree).
reedsolomon/gf_poly.go:44
↓ 2 callers
Method
numBitsToPadToCodeword
numBitsToPadToCodeword returns the number of bits required to pad data of length numDataBits upto the nearest codeword size.
version.go:3018
↓ 2 callers
Method
penalty1
penalty1 returns the penalty score for "adjacent modules in row/column with same colour". The numbers of adjacent matching modules and scores are: 0-
symbol.go:161
↓ 2 callers
Method
penalty2
penalty2 returns the penalty score for "block of modules in the same colour". m*n: score = penaltyWeight2 * (m-1) * (n-1).
symbol.go:212
↓ 2 callers
Method
penalty3
penalty3 returns the penalty score for "1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column, preceded or followed by light area 4 modul
symbol.go:236
↓ 2 callers
Method
penalty4
penalty4 returns the penalty score...
symbol.go:291
↓ 2 callers
Function
rsGeneratorPoly
rsGeneratorPoly returns the Reed-Solomon generator polynomial with |degree|. The generator polynomial is calculated as: (x + a^0)(x + a^1)...(x + a^d
reedsolomon/reed_solomon.go:60
↓ 2 callers
Method
symbolSize
symbolSize returns the size of the QR Code symbol in number of modules (which is both the width and height, since QR codes are square). The QR Code ha
version.go:3030
↓ 2 callers
Method
versionInfo
versionInfo returns the 18-bit Version Information value for a QR Code. Version Information is applicable only to QR Codes versions 7-40 inclusive. n
version.go:2938
↓ 1 callers
Method
AppendBytes
AppendBytes appends a list of whole bytes.
bitset/bitset.go:99
↓ 1 callers
Function
Clone
Clone returns a copy.
bitset/bitset.go:51
↓ 1 callers
Function
Encode
Encode a QR Code and return a raw PNG image. size is both the image width and height in pixels. If size is too small then a larger image is silently
qrcode.go:74
↓ 1 callers
Method
Image
Image returns the QR Code as an image.Image. A positive size sets a fixed image width and height (e.g. 256 yields an 256x256px image). Depending on
qrcode.go:286
↓ 1 callers
Function
NewWithForcedVersion
NewWithForcedVersion constructs a QRCode of a specific version. var q *qrcode.QRCode q, err := qrcode.NewWithForcedVersion("my content", 25, qrcode
qrcode.go:209
↓ 1 callers
Method
ToString
ToString produces a multi-line string that forms a QR-code image.
qrcode.go:555
↓ 1 callers
Function
WriteFile
WriteFile encodes, then writes a QR Code to the given filename in PNG format. size is both the image width and height in pixels. If size is too small
qrcode.go:91
↓ 1 callers
Method
addAlignmentPatterns
()
regular_symbol.go:160
↓ 1 callers
Method
addData
()
regular_symbol.go:244
↓ 1 callers
Method
addFinderPatterns
()
regular_symbol.go:138
↓ 1 callers
Method
addFormatInfo
()
regular_symbol.go:183
↓ 1 callers
Method
addPadding
addPadding pads the encoded data upto the full length required.
qrcode.go:525
↓ 1 callers
Method
addTerminatorBits
addTerminatorBits adds final terminator bits to the encoded data. The number of terminator bits required is determined when the QR Code version is ch
qrcode.go:436
↓ 1 callers
Method
addTimingPatterns
()
regular_symbol.go:172
↓ 1 callers
Method
addVersionInfo
()
regular_symbol.go:218
↓ 1 callers
Function
chooseQRCodeVersion
chooseQRCodeVersion chooses the most suitable QR Code version for a stated data length in bits, the error recovery level required, and the data encode
version.go:2967
↓ 1 callers
Method
classifyDataModes
classifyDataModes classifies the raw data into unoptimised segments. e.g. "123ZZ#!#!" => [numeric, 3, "123"] [alphanumeric, 2, "ZZ"] [byte, 4, "#!#!"]
encoder.go:219
↓ 1 callers
Method
data
(numTerms int)
reedsolomon/gf_poly.go:55
↓ 1 callers
Function
encodeAlphanumericCharacter
encodeAlphanumericChar returns the QR Code encoded value of v. v must be a QR Code defined alphanumeric character: 0-9, A-Z, SP, $%*+-./ or :. The ch
encoder.go:453
↓ 1 callers
Method
encodeBlocks
encodeBlocks takes the completed (terminated & padded) encoded data, splits the data into blocks (as specified by the QR Code version), applies error
qrcode.go:445
↓ 1 callers
Function
gfAdd
gfAdd returns a + b.
reedsolomon/gf2_8.go:85
↓ 1 callers
Function
newGFPolyFromData
newGFPolyFromData returns |data| as a polynomial over GF(2^8). Each data byte becomes the coefficient of an x term. For an n byte input the polynomi
reedsolomon/gf_poly.go:26
↓ 1 callers
Method
numBlocks
numBlocks returns the number of blocks.
version.go:3006
↓ 1 callers
Method
numEmptyModules
numEmptyModules returns the number of empty modules. Initially numEmptyModules is symbolSize * symbolSize. After every module has been set (to either
symbol.go:80
↓ 1 callers
Method
numTerminatorBitsRequired
(numDataBits int)
version.go:2990
↓ 1 callers
Method
optimiseDataModes
optimiseDataModes optimises the list of segments to reduce the overall output encoded data length. The algorithm coalesces adjacent segments. segment
encoder.go:265
↓ 1 callers
Method
penaltyScore
penaltyScore returns the penalty score of the symbol. The penalty score consists of the sum of the four individual penalty types.
symbol.go:151
↓ 1 callers
Method
quietZoneSize
quietZoneSize returns the number of pixels of border space on each side of the QR Code. The quiet space assists with decoding.
version.go:3036
↓ 1 callers
Function
segmentsString
(segments []segment)
encoder_test.go:395
↓ 1 callers
Function
testModeSegmentsString
(segments []testModeSegment)
encoder_test.go:378
↓ 1 callers
Function
zbarimgDecode
(q *QRCode)
qrcode_decode_test.go:189
Function
BenchmarkDecodeTest
(b *testing.B)
qrcode_decode_test.go:215
Function
BenchmarkQRCodeMaximumSize
(b *testing.B)
qrcode_test.go:170
Function
BenchmarkQRCodeURLSize
(b *testing.B)
qrcode_test.go:164
Function
BenchmarkShortAppend
(b *testing.B)
bitset/bitset_test.go:171
Function
TestAppend
(t *testing.T)
bitset/bitset_test.go:31
Function
TestAppendBools
(t *testing.T)
bitset/bitset_test.go:152
Function
TestAppendByte
(t *testing.T)
bitset/bitset_test.go:52
Function
TestAppendUint32
(t *testing.T)
bitset/bitset_test.go:100
next →
1–100 of 143, ranked by callers