Searched refs:bitLen (Results 1 – 4 of 4) sorted by relevance
/third_party/qrcodegen/c/ |
D | qrcodegen.c | 55 testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen); 185 testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen) { in appendBitsToBuffer() argument 187 for (int i = numBits - 1; i >= 0; i--, (*bitLen)++) in appendBitsToBuffer() 188 buffer[*bitLen >> 3] |= ((val >> i) & 1) << (7 - (*bitLen & 7)); in appendBitsToBuffer() 232 int bitLen = 0; in qrcodegen_encodeSegmentsAdvanced() local 235 appendBitsToBuffer((unsigned int)seg->mode, 4, qrcode, &bitLen); in qrcodegen_encodeSegmentsAdvanced() 236 …ndBitsToBuffer((unsigned int)seg->numChars, numCharCountBits(seg->mode, version), qrcode, &bitLen); in qrcodegen_encodeSegmentsAdvanced() 239 appendBitsToBuffer((unsigned int)bit, 1, qrcode, &bitLen); in qrcodegen_encodeSegmentsAdvanced() 242 assert(bitLen == dataUsedBits); in qrcodegen_encodeSegmentsAdvanced() 246 assert(bitLen <= dataCapacityBits); in qrcodegen_encodeSegmentsAdvanced() [all …]
|
D | qrcodegen-test.c | 48 void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen); 69 int bitLen = 0; in testAppendBitsToBuffer() local 70 appendBitsToBuffer(0, 0, buf, &bitLen); in testAppendBitsToBuffer() 71 assert(bitLen == 0); in testAppendBitsToBuffer() 73 appendBitsToBuffer(1, 1, buf, &bitLen); in testAppendBitsToBuffer() 74 assert(bitLen == 1); in testAppendBitsToBuffer() 76 appendBitsToBuffer(0, 1, buf, &bitLen); in testAppendBitsToBuffer() 77 assert(bitLen == 2); in testAppendBitsToBuffer() 79 appendBitsToBuffer(5, 3, buf, &bitLen); in testAppendBitsToBuffer() 80 assert(bitLen == 5); in testAppendBitsToBuffer() [all …]
|
/third_party/qrcodegen/java-fast/io/nayuki/fastqrcodegen/ |
D | QrSegment.java | 248 public QrSegment(Mode md, int numCh, int[] data, int bitLen) { in QrSegment() argument 251 if (numCh < 0 || bitLen < 0 || bitLen > data.length * 32L) in QrSegment() 254 bitLength = bitLen; in QrSegment()
|
/third_party/node/deps/npm/node_modules/sshpk/lib/formats/ |
D | x509.js | 689 var bitLen = 8 * (bits.length - 1) - bits[0]; 691 for (var i = 0; i < bitLen; ++i) { 711 var bitLen = bitIndex.length; 712 var blen = Math.ceil(bitLen / 8); 713 var unused = blen * 8 - bitLen; 716 for (var i = 0; i < bitLen; ++i) {
|