fn writeTwosComplement(x: Const, buffer: []u8, endian: Endian) void

Write the value of x into buffer Asserts that buffer is large enough to store the value.

buffer is filled so that its contents match what would be observed via @ptrCast(*[buffer.len]const u8, &x). Byte ordering is determined by endian, and any required padding bits are added on the MSB end.

Parameters

x: Const,
buffer: []u8,
endian: Endian,