code: def write_var_bytes(self, value, little_endian: bool = True):
          
          length = len(value)
          self.write_var_int(length, little_endian)
          return self.write_bytes(value, to_bytes=False)
docs: Write an integer value in a space saving way to the stream.
  
          :param value:
          :param little_endian: specify the endianness. (Default) Little endian.
          :return: int: the number of bytes written.