Write an integer value to the stream using the longest encoding (4 bytes plus marker byte).
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.