Encode and write an int value to the stream in the shortest possible representation.
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.