pub fn writeTwosComplement(x: Const, buffer: []u8, endian: Endian) void 2590
2591
2592 pub fn writeTwosComplement(x: Const, buffer: []u8, endian: Endian) void {
return writePackedTwosComplement(x, buffer, 0, 8 * buffer.len, endian);
}
Write the value of
xintobufferAsserts thatbufferis large enough to store the value.bufferis filled so that its contents match what would be observed via @ptrCast(*[buffer.len]const u8, &x). Byte ordering is determined byendian, and any required padding bits are added on the MSB end.