@staticmethod
def _to_bytes(str_value: str):
    """
        Convert string to bytes
        :param str_value: str
        :return: bytes
        """
    length = len(str_value).bit_length() // 8 + 1
    res = len(str_value).to_bytes(length, byteorder='little')
    return res
