private void calcViewPositions() {
        viewPositions = new HashMap<>();
        byte lastId = view.literals[0].id;
        int lastStart = 0;
        for (int i = 1; i < view.literals.length; i++) {
            if (lastId != view.literals[i].id) {
                viewPositions.put(lastId, new int[]{lastStart, i});
                lastStart = i;
                lastId = view.literals[i].id;
            }
        }
        viewPositions.put(lastId, new int[]{lastStart, view.literals.length});

    }