Lines Matching refs:byteLength

254 	        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
316 var length = byteLength(string, encoding) | 0
378 array.byteLength
524 function byteLength (string, encoding) {
559 Buffer.byteLength = byteLength
1007 Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
1009 byteLength = byteLength | 0
1010 if (!noAssert) checkOffset(offset, byteLength, this.length)
1015 while (++i < byteLength && (mul *= 0x100)) {
1022 Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
1024 byteLength = byteLength | 0
1026 checkOffset(offset, byteLength, this.length)
1029 var val = this[offset + --byteLength]
1031 while (byteLength > 0 && (mul *= 0x100)) {
1032 val += this[offset + --byteLength] * mul
1071 Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
1073 byteLength = byteLength | 0
1074 if (!noAssert) checkOffset(offset, byteLength, this.length)
1079 while (++i < byteLength && (mul *= 0x100)) {
1084 if (val >= mul) val -= Math.pow(2, 8 * byteLength)
1089 Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
1091 byteLength = byteLength | 0
1092 if (!noAssert) checkOffset(offset, byteLength, this.length)
1094 var i = byteLength
1102 if (val >= mul) val -= Math.pow(2, 8 * byteLength)
1169 Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
1172 byteLength = byteLength | 0
1173 if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
1178 while (++i < byteLength && (mul *= 0x100)) {
1182 return offset + byteLength
1185 Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
1188 byteLength = byteLength | 0
1189 if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
1191 var i = byteLength - 1
1198 return offset + byteLength
1281 Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
1285 var limit = Math.pow(2, 8 * byteLength - 1)
1287 checkInt(this, value, offset, byteLength, limit - 1, -limit)
1294 while (++i < byteLength && (mul *= 0x100)) {
1298 return offset + byteLength
1301 Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
1305 var limit = Math.pow(2, 8 * byteLength - 1)
1307 checkInt(this, value, offset, byteLength, limit - 1, -limit)
1310 var i = byteLength - 1
1318 return offset + byteLength
5121 var byteLength = buffer.byteLength,
5122 floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0,
5124 result = new ArrayBuffer(byteLength);
5130 if (byteLength != offset) {