vfbLib.compilers.value.write_value

vfbLib.compilers.value.write_value(value: int, stream: BufferedWriter | BytesIO, signed=True) None

Encode and write an int value to the stream in the shortest possible representation.

Parameters:
  • value (int) – The value to write to the stream.

  • stream (BufferedWriter | BytesIO) – The output stream.

  • signed (bool, optional) – Whether the value is signed. Defaults to True.