def read_until(steg_bytes: bytes, offset: int, ending: str):
    """
    Read the bytes of the steg_bytes from the offset until the ending byte sequence is found.
    Return the bytes read and the offset of the ending byte sequence.
    """
    # Create a variable to hold the bytes read
    bytes_read = b""

    # Loop through the steg_bytes
    while offset < len(steg_bytes):
        # Check if the current byte is the ending byte sequence
        if steg_bytes[offset:offset + len(ending)] == ending.encode():
            # Return the bytes read and the offset of the ending byte sequence
            return bytes_read, offset
        # Read the next byte
        bytes_read += steg_bytes[offset:offset + 1]
        offset += 1