numBlocks returns the number of blocks.
()
| 3004 | |
| 3005 | // numBlocks returns the number of blocks. |
| 3006 | func (v qrCodeVersion) numBlocks() int { |
| 3007 | numBlocks := 0 |
| 3008 | |
| 3009 | for _, b := range v.block { |
| 3010 | numBlocks += b.numBlocks |
| 3011 | } |
| 3012 | |
| 3013 | return numBlocks |
| 3014 | } |
| 3015 | |
| 3016 | // numBitsToPadToCodeword returns the number of bits required to pad data of |
| 3017 | // length numDataBits upto the nearest codeword size. |