Function readTwosComplement [src]

Read the value of x from buffer. Asserts that buffer is large enough to contain a value of bit-size bit_count. The contents of buffer are interpreted as if they were the contents of @ptrCast(*[buffer.len]const u8, &x). Byte ordering is determined by endian and any required padding bits are expected on the MSB end.

Prototype

pub fn readTwosComplement( x: *Mutable, buffer: []const u8, bit_count: usize, endian: Endian, signedness: Signedness, ) void

Parameters

x: *Mutablebuffer: []const u8bit_count: usizeendian: Endiansignedness: Signedness

Source

pub fn readTwosComplement( x: *Mutable, buffer: []const u8, bit_count: usize, endian: Endian, signedness: Signedness, ) void { return readPackedTwosComplement(x, buffer, 0, bit_count, endian, signedness); }