import struct


def set_str(value: str) -> bytes:
    """
    Converts string value into bytes
    :param value: string
    :return: bytes
    """
    return struct.pack(">h", len(value)) + bytes(value, "utf8")