def loadNullTerminatedStringFrom(data, offset, charWidth=1, encoding='latin-1'
    ):
    """
    Load a null-terminated string from data at offset, with the options
    given
    """
    end = data.find(b'\x00' * charWidth, offset)
    return data[offset:end].decode(encoding)
