writeUint64LE static method

BuBytes writeUint64LE(
  1. int value, [
  2. List<int>? out,
  3. int offset = 0
])

Writes a 64-bit unsigned integer value in little-endian byte order to a list.

Implementation

static BuBytes writeUint64LE(int value, [List<int>? out, int offset = 0]) {
  final List<int> target = out ?? List<int>.filled(8, 0);

  writeUint32LE(value & mask32, target, offset);
  writeUint32LE((value >> 32) & mask32, target, offset + 4);

  if (target is BuBytes) return target;
  return BuBytes(target);
}