(buff, val, offset = 0)
| 264 | } |
| 265 | |
| 266 | function writeInt64(buff, val, offset = 0) { |
| 267 | val = +val; |
| 268 | if (typeof val === 'number') val = BigInt(val); |
| 269 | checkBounds(buff, offset, 7); |
| 270 | |
| 271 | bigInt64Array[0] = val; |
| 272 | buff[offset++] = uint8BigInt64Array[0]; |
| 273 | buff[offset++] = uint8BigInt64Array[1]; |
| 274 | buff[offset++] = uint8BigInt64Array[2]; |
| 275 | buff[offset++] = uint8BigInt64Array[3]; |
| 276 | buff[offset++] = uint8BigInt64Array[4]; |
| 277 | buff[offset++] = uint8BigInt64Array[5]; |
| 278 | buff[offset++] = uint8BigInt64Array[6]; |
| 279 | buff[offset++] = uint8BigInt64Array[7]; |
| 280 | return offset; |
| 281 | } |
| 282 | |
| 283 | const bigUint64Array = new BigUint64Array(1); |
| 284 | const uint8BigUint64Array = new Uint8Array(bigUint64Array.buffer); |
nothing calls this directly
no test coverage detected