MCPcopy
hub / github.com/skip2/go-qrcode / numDataBits

Method numDataBits

version.go:2950–2957  ·  view source on GitHub ↗

numDataBits returns the data capacity in bits.

()

Source from the content-addressed store, hash-verified

2948
2949// numDataBits returns the data capacity in bits.
2950func (v qrCodeVersion) numDataBits() int {
2951 numDataBits := 0
2952 for _, b := range v.block {
2953 numDataBits += 8 * b.numBlocks * b.numDataCodewords // 8 bits in a byte
2954 }
2955
2956 return numDataBits
2957}
2958
2959// chooseQRCodeVersion chooses the most suitable QR Code version for a stated
2960// data length in bits, the error recovery level required, and the data encoder

Callers 5

NewWithForcedVersionFunction · 0.80
addPaddingMethod · 0.80
chooseQRCodeVersionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected