reuse fixed size DataViews

This commit is contained in:
2025-01-22 23:10:42 -06:00
parent c33a2dfd33
commit 7d7b92678b
3 changed files with 3 additions and 3 deletions
@@ -1,7 +1,7 @@
import chunk from '../chunk';
const buf = new DataView(new ArrayBuffer(8));
export default (timestamp: bigint): Uint8Array => {
const buf = new DataView(new ArrayBuffer(8));
buf.setBigUint64(0, BigInt(timestamp), true);
return chunk(0x0006, new Uint8Array(buf.buffer), false);
};