Home
last modified time | relevance | path

Searched refs:byteLength (Results 1 - 25 of 157) sorted by relevance

1234567

/third_party/node/lib/internal/
H A Dbuffer.js54 function checkBounds(buf, offset, byteLength) {
56 if (buf[offset] === undefined || buf[offset + byteLength] === undefined)
57 boundsError(offset, buf.length - (byteLength + 1));
60 function checkInt(value, min, max, buf, offset, byteLength) {
64 if (byteLength > 3) {
66 range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`;
68 range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and ` +
69 `< 2${n} ** ${(byteLength + 1) * 8 - 1}${n}`;
76 checkBounds(buf, offset, byteLength);
170 function readUIntLE(offset, byteLength) {
[all...]
/third_party/node/test/parallel/
H A Dtest-fs-read-optional-params.js11 const bufferAsOption = Buffer.allocUnsafe(expected.byteLength);
17 assert.strictEqual(bytesRead, expected.byteLength, paramsMsg);
18 assert.deepStrictEqual(defaultBufferAsync.byteLength, buffer.byteLength, paramsMsg);
25 assert.strictEqual(bytesRead, expected.byteLength, optionsMsg);
26 assert.deepStrictEqual(bufferAsOption.byteLength, buffer.byteLength, optionsMsg);
36 length: bufferAsOption.byteLength,
H A Dtest-fs-mkdtemp.js25 assert.strictEqual(Buffer.byteLength(path.basename(utf8)),
26 Buffer.byteLength('\u0222abc.XXXXXX'));
49 assert.strictEqual(Buffer.byteLength(path.basename(utf8)),
50 Buffer.byteLength('\u0222abc.XXXXXX'));
71 assert.strictEqual(Buffer.byteLength(path.basename(utf8)),
72 Buffer.byteLength('\u0222abc.XXXXXX'));
95 assert.strictEqual(Buffer.byteLength(path.basename(utf8)),
96 Buffer.byteLength('\u0222abc.XXXXXX'));
/third_party/node/test/fixtures/wpt/streams/readable-byte-streams/
H A Dgeneral.any.js308 bufferByteLength: view.buffer.byteLength,
310 byteLength: view.byteLength
361 assert_equals(viewInfo.bufferByteLength, 16, 'first view.buffer.byteLength should be 16');
363 assert_equals(viewInfo.byteLength, 16, 'first view.byteLength should be 16');
371 assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16');
373 assert_equals(value.byteLength, 1, 'first value.byteLength shoul
[all...]
/third_party/node/test/fixtures/wpt/wasm/jsapi/memory/
H A Dassertions.js11 let byteLength;
13 byteLength = actual.byteLength;
15 byteLength = 0;
17 assert_equals(byteLength, 0, `${message}: detached size`);
19 assert_equals(actual.byteLength, 0x10000 * size, `${message}: size`);
23 assert_equals(array[array.byteLength - 1], 0, `${message}: last element`);
/third_party/node/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/
H A Daes_gcm_vectors.js33 var result = new Uint8Array(ciphertext[keyLength].byteLength + byteCount);
35 result.set(tag[keyLength].slice(0, byteCount), ciphertext[keyLength].byteLength);
37 name: "AES-GCM " + keyLength.toString() + "-bit key, " + tagLength.toString() + "-bit tag, " + (iv.byteLength << 3).toString() + "-bit iv",
45 var noadresult = new Uint8Array(ciphertext[keyLength].byteLength + byteCount);
47 noadresult.set(tag_with_empty_ad[keyLength].slice(0, byteCount), ciphertext[keyLength].byteLength);
49 name: "AES-GCM " + keyLength.toString() + "-bit key, no additional data, " + tagLength.toString() + "-bit tag, " + (iv.byteLength << 3).toString() + "-bit iv",
65 name: "AES-GCM " + keyLength.toString() + "-bit key, " + (iv.byteLength << 3).toString() + "-bit iv, " + "illegal tag length " + badTagLength.toString() + "-bits",
H A Drsa.js136 assert_equals(ciphertext.byteLength * 8, vector.privateKey.algorithm.modulusLength, "Ciphertext length matches modulus length");
180 assert_equals(ciphertext.byteLength * 8, vector.privateKey.algorithm.modulusLength, "Ciphertext length matches modulus length");
220 var plaintext = new Uint8Array(vector.plaintext.byteLength + 1);
222 plaintext.set(new Uint8Array([32]), vector.plaintext.byteLength);
322 var copy = new Uint8Array(sourceBuffer.byteLength)
324 for (var i=0; i<source.byteLength; i++) {
351 var copy = new Uint8Array(sourceBuffer.byteLength)
353 for (var i=0; i<source.byteLength; i++) {
361 if (a.byteLength !== b.byteLength) {
[all...]
/third_party/node/test/fixtures/wpt/FileAPI/support/
H A DBlob.js58 return new DataView(array.buffer, array.byteOffset, array.byteLength);
61 assert_equals(view1.byteLength, view2.byteLength,
64 const byteLength = view1.byteLength;
66 for (let i = 0; i < byteLength; ++i) {
/third_party/protobuf/js/experimental/runtime/kernel/
H A Dtyped_arrays.js34 if (array1.byteLength !== array2.byteLength) {
38 for (let i = 0; i < array1.byteLength; i++) {
59 assert(end === undefined || (end >= 0 && end <= buffer.byteLength));
60 assert((end === undefined ? buffer.byteLength : end) >= start);
68 if (slicedBuffer.byteLength !== 0 || (start === end)) {
72 const realEnd = end == null ? buffer.byteLength : end;
91 view.buffer, view.byteOffset, view.byteOffset + view.byteLength));
H A Dtextencoding.js37 while (cursor < bytes.byteLength) {
47 checkElementIndex(cursor, bytes.byteLength);
51 checkElementIndex(cursor + 1, bytes.byteLength);
56 checkElementIndex(cursor + 2, bytes.byteLength);
/third_party/node/test/fixtures/wpt/WebCryptoAPI/digest/
H A Ddigest.https.any.js12 sourceData.long = new Uint8Array(1024 * sourceData.medium.byteLength);
14 sourceData.long.set(sourceData.medium, i * sourceData.medium.byteLength);
128 var copy = new Uint8Array(sourceBuffer.byteLength)
130 for (var i=0; i<source.byteLength; i++) {
138 if (a.byteLength !== b.byteLength) {
145 for (var i=0; i<a.byteLength; i++) {
/third_party/node/lib/
H A Dv8.js327 this.writeUint32(abView.byteLength);
330 abView.byteLength));
343 const byteLength = this.readUint32();
344 const byteOffset = this._readRawBytes(byteLength);
351 byteLength / BYTES_PER_ELEMENT);
354 const buffer_copy = Buffer.allocUnsafe(byteLength);
355 copy(this.buffer, buffer_copy, 0, byteOffset, byteOffset + byteLength);
358 byteLength / BYTES_PER_ELEMENT);
/third_party/skia/src/utils/
H A DSkUTF.cpp48 int SkUTF::CountUTF8(const char* utf8, size_t byteLength) { in CountUTF8() argument
53 const char* stop = utf8 + byteLength; in CountUTF8()
71 int SkUTF::CountUTF16(const uint16_t* utf16, size_t byteLength) { in CountUTF16() argument
72 if (!utf16 || !is_align2(intptr_t(utf16)) || !is_align2(byteLength)) { in CountUTF16()
76 const uint16_t* stop = src + (byteLength >> 1); in CountUTF16()
97 int SkUTF::CountUTF32(const int32_t* utf32, size_t byteLength) { in CountUTF32() argument
98 if (!is_align4(intptr_t(utf32)) || !is_align4(byteLength) || !SkTFitsIn<int>(byteLength >> 2)) { in CountUTF32()
103 const uint32_t* stop = ptr + (byteLength >> 2); in CountUTF32()
110 return (int)(byteLength >> in CountUTF32()
[all...]
H A DSkUTF.h18 SK_SPI int CountUTF8(const char* utf8, size_t byteLength);
24 SK_SPI int CountUTF16(const uint16_t* utf16, size_t byteLength);
30 SK_SPI int CountUTF32(const int32_t* utf32, size_t byteLength);
/third_party/skia/gm/
H A Dskbug_5321.cpp28 size_t byteLength = strlen(text); in DEF_SIMPLE_GM() local
29 canvas->drawSimpleText(text, byteLength, SkTextEncoding::kUTF8, x, y, font, SkPaint()); in DEF_SIMPLE_GM()
32 int glyph_count = font.countText(text, byteLength, SkTextEncoding::kUTF8); in DEF_SIMPLE_GM()
36 font.textToGlyphs(text, byteLength, SkTextEncoding::kUTF8, rec.glyphs, glyph_count); in DEF_SIMPLE_GM()
H A Dannotated_text.cpp25 size_t byteLength = strlen(static_cast<const char*>(text)); in draw_url_annotated_text_with_box() local
27 (void)font.measureText(text, byteLength, SkTextEncoding::kUTF8, &bounds); in draw_url_annotated_text_with_box()
34 canvas->drawSimpleText(text, byteLength, SkTextEncoding::kUTF8, x, y, font, SkPaint()); in draw_url_annotated_text_with_box()
/third_party/jerryscript/tests/unit-core/
H A Dtest-dataview.cpp68 jerry_length_t byteLength = 0;; in HWTEST_F() local
69 jerry_value_t internal_buffer = jerry_get_dataview_buffer (view1, &byteOffset, &byteLength); in HWTEST_F()
72 TEST_ASSERT (byteLength == 16); in HWTEST_F()
78 internal_buffer = jerry_get_dataview_buffer (view2, &byteOffset, &byteLength); in HWTEST_F()
81 TEST_ASSERT (byteLength == 4); in HWTEST_F()
/third_party/node/test/fixtures/crypto/
H A Daes_gcm.js91 new Uint8Array(kCiphertext[keyLength].byteLength + byteCount);
94 kCiphertext[keyLength].byteLength);
103 new Uint8Array(kCiphertext[keyLength].byteLength + byteCount);
106 kCiphertext[keyLength].byteLength);
/third_party/node/benchmark/buffers/
H A Dbuffer-read-with-byteLength.js15 byteLength: [1, 2, 3, 4, 5, 6],
18 function main({ n, buf, type, byteLength }) {
27 buff[fn](0, byteLength);
/third_party/node/test/fixtures/wpt/WebCryptoAPI/import_export/
H A Dokp_importKey.https.any.js135 if (a.byteLength !== b.byteLength) {
142 for (var i=0; i<a.byteLength; i++) {
179 result.alg = "A" + (8 * keyData.byteLength).toString() + algorithm.name.substring(4);
189 for (var i=0; i<byteArray.byteLength; i++){
239 if ("byteLength" in data) {
240 data = "buffer(" + data.byteLength.toString() + ")";
/third_party/skia/include/core/
H A DSkFont.h278 If byteLength equals zero, returns zero.
279 If byteLength includes a partial character, the partial character is ignored.
294 @param byteLength length of character storage in bytes
297 @return number of glyphs represented by text of length byteLength
299 int textToGlyphs(const void* text, size_t byteLength, SkTextEncoding encoding,
320 @param byteLength length of character storage in bytes
321 @return number of glyphs represented by text of length byteLength
323 int countText(const void* text, size_t byteLength, SkTextEncoding encoding) const { in countText() argument
324 return this->textToGlyphs(text, byteLength, encoding, nullptr, 0); in countText()
332 @param byteLength lengt
336 measureText(const void* text, size_t byteLength, SkTextEncoding encoding, SkRect* bounds = nullptr) const measureText() argument
[all...]
/third_party/jerryscript/tests/jerry/es2015/
H A Ddataview.js102 var accessorList = ['buffer', 'byteOffset', 'byteLength'];
121 assert (view1.byteLength === buffer.byteLength);
126 assert (view2.byteLength === buffer.byteLength - view2.byteOffset);
131 assert (view3.byteLength === 16);
/third_party/node/deps/undici/src/lib/websocket/
H A Dwebsocket.js177 reasonByteLength = Buffer.byteLength(reason)
294 this.#bufferedAmount += value.byteLength
296 this.#bufferedAmount -= value.byteLength
315 this.#bufferedAmount += value.byteLength
317 this.#bufferedAmount -= value.byteLength
332 const ab = Buffer.from(data, data.byteOffset, data.byteLength)
337 this.#bufferedAmount += ab.byteLength
339 this.#bufferedAmount -= ab.byteLength
360 this.#bufferedAmount += value.byteLength
362 this.#bufferedAmount -= value.byteLength
[all...]
/third_party/node/lib/internal/fs/
H A Dpromises.js293 const { bytesRead } = await readFn(view, view.byteOffset, view.byteLength);
442 let remaining = toWrite.byteLength;
446 filehandle, toWrite, toWrite.byteLength - remaining, writeSize);
453 data = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
454 let remaining = data.byteLength;
460 MathMin(kWriteFileMaxChunkSize, data.byteLength));
465 data.byteLength - bytesWritten,
596 length = buffer.byteLength - offset,
607 length = buffer.byteLength - offset,
623 if (buffer.byteLength
[all...]
/third_party/node/test/fixtures/wpt/WebCryptoAPI/sign_verify/
H A Decdsa_vectors.js93 vector.signature = vector.signature.subarray(0, vector.signature.byteLength - 1);
111 const r = vector.signature.subarray(0, vector.signature.byteLength / 2);
112 const s = vector.signature.subarray(vector.signature.byteLength);
133 vector.signature = new Uint8Array(vector.signature.byteLength);

Completed in 9 milliseconds

1234567