MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / writeCount

Method writeCount

projects/JavaScript/proto/fbe.js:1077–1084  ·  view source on GitHub ↗

* Write byte value of the given count into the field model buffer * @this {!FieldModelBase} * @param {!number} offset Offset * @param {!number} value Byte value * @param {!number} valueCount Count

(offset, value, valueCount)

Source from the content-addressed store, hash-verified

1075 * @param {!number} valueCount Count
1076 */
1077 writeCount (offset, value, valueCount) {
1078 offset = offset >>> 0
1079 offset += this._buffer.offset
1080 this._buffer.checkOffset(offset, valueCount)
1081 for (let i = 0; i < valueCount; i++) {
1082 this._buffer.buffer[offset + i] = (value & 0xFF)
1083 }
1084 }
1085
1086 /**
1087 * Write string into the field model buffer

Callers 5

setMethod · 0.80
resizeMethod · 0.80
resizeMethod · 0.80
resizeMethod · 0.80
setMethod · 0.80

Calls 1

checkOffsetMethod · 0.45

Tested by

no test coverage detected