public static EndianNess fromId(String id) {
            for (EndianNess value : values()) {
                if (value.id.equals(id)) {
                    return value;
                }
            }
            throw new IllegalArgumentException("EndianNess must be either 'big' or 'little', but was '" + id + "'");
        }
Macro that expands to the appropriate map_subspaces magic incantation

@author arnej
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/UnpackBitsNode.java