numBitsToPadToCodeword returns the number of bits required to pad data of length numDataBits upto the nearest codeword size.
(numDataBits int)
| 3016 | // numBitsToPadToCodeword returns the number of bits required to pad data of |
| 3017 | // length numDataBits upto the nearest codeword size. |
| 3018 | func (v qrCodeVersion) numBitsToPadToCodeword(numDataBits int) int { |
| 3019 | if numDataBits == v.numDataBits() { |
| 3020 | return 0 |
| 3021 | } |
| 3022 | |
| 3023 | return (8 - numDataBits%8) % 8 |
| 3024 | } |
| 3025 | |
| 3026 | // symbolSize returns the size of the QR Code symbol in number of modules (which |
| 3027 | // is both the width and height, since QR codes are square). The QR Code has |