Home
last modified time | relevance | path

Searched refs:bitLength (Results 1 – 20 of 20) sorted by relevance

/third_party/qrcodegen/java-fast/io/nayuki/fastqrcodegen/
DBitBuffer.java37 int bitLength; // Always non-negative. field in BitBuffer
46 bitLength = 0; in BitBuffer()
55 if (index < 0 || index >= bitLength) in getBit()
64 if (bitLength % 8 != 0) in getBytes()
66 byte[] result = new byte[bitLength / 8]; in getBytes()
78 if (len > Integer.MAX_VALUE - bitLength) in appendBits()
81 if (bitLength + len + 1 > data.length << 5) in appendBits()
83 assert bitLength + len <= data.length << 5; in appendBits()
85 int remain = 32 - (bitLength & 0x1F); in appendBits()
88 data[bitLength >>> 5] |= val >>> (len - remain); in appendBits()
[all …]
DQrSegment.java96 return new QrSegment(Mode.NUMERIC, digits.length(), bb.data, bb.bitLength); in makeNumeric()
128 return new QrSegment(Mode.ALPHANUMERIC, text.length(), bb.data, bb.bitLength); in makeAlphanumeric()
176 return new QrSegment(Mode.ECI, 0, bb.data, bb.bitLength); in makeEci()
232 final int bitLength; field in QrSegment
254 bitLength = bitLen; in QrSegment()
269 result += 4L + ccbits + seg.bitLength; in getTotalBits()
DQrCode.java176 bb.appendBits(seg.data, seg.bitLength); in encodeSegments()
178 assert bb.bitLength == dataUsedBits; in encodeSegments()
182 assert bb.bitLength <= dataCapacityBits; in encodeSegments()
183 bb.appendBits(0, Math.min(4, dataCapacityBits - bb.bitLength)); in encodeSegments()
184 bb.appendBits(0, (8 - bb.bitLength % 8) % 8); in encodeSegments()
185 assert bb.bitLength % 8 == 0; in encodeSegments()
188 for (int padByte = 0xEC; bb.bitLength < dataCapacityBits; padByte ^= 0xEC ^ 0x11) in encodeSegments()
DQrSegmentAdvanced.java263 return new QrSegment(Mode.KANJI, text.length(), bb.data, bb.bitLength); in makeKanji()
/third_party/qrcodegen/java/src/main/java/io/nayuki/qrcodegen/
DBitBuffer.java39 private int bitLength; // Non-negative field in BitBuffer
50 bitLength = 0; in BitBuffer()
61 public int bitLength() { in bitLength() method in BitBuffer
62 assert bitLength >= 0; in bitLength() local
63 return bitLength; in bitLength()
74 if (index < 0 || index >= bitLength) in getBit()
92 if (Integer.MAX_VALUE - bitLength < len) in appendBits()
94 for (int i = len - 1; i >= 0; i--, bitLength++) // Append bit by bit in appendBits()
95 data.set(bitLength, QrCode.getBit(val, i)); in appendBits()
108 if (Integer.MAX_VALUE - bitLength < bb.bitLength) in appendData()
[all …]
DQrCode.java178 assert bb.bitLength() == dataUsedBits; in encodeSegments()
182 assert bb.bitLength() <= dataCapacityBits; in encodeSegments()
183 bb.appendBits(0, Math.min(4, dataCapacityBits - bb.bitLength())); in encodeSegments()
184 bb.appendBits(0, (8 - bb.bitLength() % 8) % 8); in encodeSegments()
185 assert bb.bitLength() % 8 == 0; in encodeSegments()
188 for (int padByte = 0xEC; bb.bitLength() < dataCapacityBits; padByte ^= 0xEC ^ 0x11) in encodeSegments()
192 byte[] dataCodewords = new byte[bb.bitLength() / 8]; in encodeSegments()
193 for (int i = 0; i < bb.bitLength(); i++) in encodeSegments()
DQrSegment.java251 result += 4L + ccbits + seg.data.bitLength(); in getTotalBits()
/third_party/node/lib/internal/
Dwebidl.js76 function convertToInt(name, value, bitLength, options = kEmptyObject) { argument
82 if (bitLength === 64) {
93 upperBound = pow2(bitLength) - 1;
98 lowerBound = -pow2(bitLength - 1);
99 upperBound = pow2(bitLength - 1) - 1;
151 x = modulo(x, pow2(bitLength));
155 if (signed && x >= pow2(bitLength - 1)) {
156 return x - pow2(bitLength);
/third_party/node/deps/npm/node_modules/@tufjs/models/dist/
Drole.js192 const { bitLength, namePrefix } = opts;
193 if (bitLength <= 0 || bitLength > 32) {
196 this.bitLength = bitLength;
202 this.numberOfBins = Math.pow(2, bitLength);
212 this.bitLength === other.bitLength &&
233 const shiftValue = 32 - this.bitLength;
271 bit_length: this.bitLength,
293 bitLength: bit_length, property
/third_party/qrcodegen/c/
Dqrcodegen.c152 seg.bitLength = calcSegmentBitLength(seg.mode, textLen); in qrcodegen_encodeText()
153 if (seg.bitLength == -1) in qrcodegen_encodeText()
172 seg.bitLength = calcSegmentBitLength(seg.mode, dataLen); in qrcodegen_encodeBinary()
173 if (seg.bitLength == -1) { in qrcodegen_encodeBinary()
237 for (int j = 0; j < seg->bitLength; j++) { in qrcodegen_encodeSegmentsAdvanced()
880 result.bitLength = calcSegmentBitLength(result.mode, len); in qrcodegen_makeBytes()
881 assert(result.bitLength != -1); in qrcodegen_makeBytes()
901 result.bitLength = 0; in qrcodegen_makeNumeric()
911 appendBitsToBuffer(accumData, 10, buf, &result.bitLength); in qrcodegen_makeNumeric()
917 appendBitsToBuffer(accumData, accumCount * 3 + 1, buf, &result.bitLength); in qrcodegen_makeNumeric()
[all …]
Dqrcodegen-test.c851 assert(seg.bitLength == 0); in testMakeBytes()
859 assert(seg.bitLength == 8); in testMakeBytes()
868 assert(seg.bitLength == 24); in testMakeBytes()
882 assert(seg.bitLength == 0); in testMakeNumeric()
889 assert(seg.bitLength == 4); in testMakeNumeric()
897 assert(seg.bitLength == 7); in testMakeNumeric()
905 assert(seg.bitLength == 10); in testMakeNumeric()
914 assert(seg.bitLength == 34); in testMakeNumeric()
930 assert(seg.bitLength == 0); in testMakeAlphanumeric()
937 assert(seg.bitLength == 6); in testMakeAlphanumeric()
[all …]
Dqrcodegen-demo.c252 seg.bitLength = 0; in doSegmentDemo()
254 for (int j = 12; j >= 0; j--, seg.bitLength++) in doSegmentDemo()
255 segBuf[seg.bitLength >> 3] |= ((kanjiChars[i] >> j) & 1) << (7 - (seg.bitLength & 7)); in doSegmentDemo()
Dqrcodegen.h125 int bitLength; member
/third_party/node/deps/undici/src/lib/fetch/
Dwebidl.js82 webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { argument
87 if (bitLength === 64) {
105 upperBound = Math.pow(2, bitLength) - 1
110 lowerBound = Math.pow(-2, bitLength) - 1
113 upperBound = Math.pow(2, bitLength - 1) - 1
189 x = x % Math.pow(2, bitLength)
193 if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {
194 return x - Math.pow(2, bitLength)
/third_party/node/lib/internal/crypto/
Dwebidl.js109 function createIntegerConversion(bitLength) { argument
111 const upperBound = MathPow(2, bitLength) - 1;
113 const twoToTheBitLength = MathPow(2, bitLength);
/third_party/skia/third_party/externals/brotli/research/
Dbrotlidump.py173 def __init__(self, *, alphabetSize=None, bitLength=None, **args): argument
174 if bitLength is not None: alphabetSize = 1<<bitLength
510 super().__init__(name, bitLength=1, **args)
564 super().__init__('PFX', bitLength=2)
748 super().__init__('SKIP', bitLength=(-streamPos)&7)
780 super().__init__('SKIP', bitLength=2)
892 super().__init__('DIST', bitLength=2)
920 super().__init__('LC'+str(number), bitLength=2)
1047 super().__init__('IC'+str(number), bitLength=10)
/third_party/node/deps/undici/src/types/
Dwebidl.d.ts56 bitLength: number,
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/
DDecimalQuantity_AbstractBCD.java415 if (n.bitLength() < 32) { in _setToBigInteger()
417 } else if (n.bitLength() < 64) { in _setToBigInteger()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DDecimalQuantity_AbstractBCD.java427 if (n.bitLength() < 32) { in _setToBigInteger()
429 } else if (n.bitLength() < 64) { in _setToBigInteger()
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/
DTextFormat.java2549 if (bigValue.bitLength() > 31) { in parseInteger()
2554 if (bigValue.bitLength() > 32) { in parseInteger()
2561 if (bigValue.bitLength() > 63) { in parseInteger()
2566 if (bigValue.bitLength() > 64) { in parseInteger()