if (offset >= this.length) return
this[offset] = value
+ return offset + 1
}
function writeUInt16 (buf, value, offset, littleEndian, noAssert) {
(value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
+ return offset + 2
}
Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
- writeUInt16(this, value, offset, true, noAssert)
+ return writeUInt16(this, value, offset, true, noAssert)
}
Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
- writeUInt16(this, value, offset, false, noAssert)
+ return writeUInt16(this, value, offset, false, noAssert)
}
function writeUInt32 (buf, value, offset, littleEndian, noAssert) {
buf[offset + i] =
(value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
+ return offset + 4
}
Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
- writeUInt32(this, value, offset, true, noAssert)
+ return writeUInt32(this, value, offset, true, noAssert)
}
Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
- writeUInt32(this, value, offset, false, noAssert)
+ return writeUInt32(this, value, offset, false, noAssert)
}
Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
this.writeUInt8(value, offset, noAssert)
else
this.writeUInt8(0xff + value + 1, offset, noAssert)
+ return offset + 1
}
function writeInt16 (buf, value, offset, littleEndian, noAssert) {
writeUInt16(buf, value, offset, littleEndian, noAssert)
else
writeUInt16(buf, 0xffff + value + 1, offset, littleEndian, noAssert)
+ return offset + 2
}
Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
- writeInt16(this, value, offset, true, noAssert)
+ return writeInt16(this, value, offset, true, noAssert)
}
Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
- writeInt16(this, value, offset, false, noAssert)
+ return writeInt16(this, value, offset, false, noAssert)
}
function writeInt32 (buf, value, offset, littleEndian, noAssert) {
writeUInt32(buf, value, offset, littleEndian, noAssert)
else
writeUInt32(buf, 0xffffffff + value + 1, offset, littleEndian, noAssert)
+ return offset + 4
}
Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
- writeInt32(this, value, offset, true, noAssert)
+ return writeInt32(this, value, offset, true, noAssert)
}
Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
- writeInt32(this, value, offset, false, noAssert)
+ return writeInt32(this, value, offset, false, noAssert)
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
return
ieee754.write(buf, value, offset, littleEndian, 23, 4)
+ return offset + 4
}
Buffer.prototype.writeFloatLE = function (value, offset, noAssert) {
- writeFloat(this, value, offset, true, noAssert)
+ return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
- writeFloat(this, value, offset, false, noAssert)
+ return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
return
ieee754.write(buf, value, offset, littleEndian, 52, 8)
+ return offset + 8
}
Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) {
- writeDouble(this, value, offset, true, noAssert)
+ return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
- writeDouble(this, value, offset, false, noAssert)
+ return writeDouble(this, value, offset, false, noAssert)
}
// fill(value, start=0, end=buffer.length)