private static void visualizeAlignment(FileWriter fw, int bitWidth,
                                           int valueEndBitIndex, int valueStartBitWanted, int valueEndBitWanted,
                                           int byteStartBitWanted, int byteEndBitWanted, int shift) throws IOException {
        // ASCII art to visualize what is happening
        fw.append("//");
        int buf = 2 + Math.max(0, bitWidth + 8);
        for (int i = 0; i < buf; i++) {
            fw.append(" ");
        }
        fw.append("[");
        for (int i = 7; i >= 0; i--) {
            if (i <= byteStartBitWanted && i >= byteEndBitWanted) {
                fw.append(String.valueOf(i));
            } else {
                fw.append("_");
            }
        }
        fw.append("]\n          //");
        for (int i = 0; i < buf + (8 - bitWidth + shift); i++) {
            fw.append(" ");
        }
        fw.append("[");
        for (int i = bitWidth - 1; i >= 0; i--) {
            if (i <= valueStartBitWanted && i >= valueEndBitWanted) {
                fw.append(String.valueOf(i % 10));
            } else {
                fw.append("_");
            }
        }
        fw.append("]\n");
        fw.append("           ");
    }
\n");
        if (msbFirst) {
            fw.append(" * Packs from the Most Significant Bit first\n");
        } else {
            fw.append(" * Packs from the Least Significant Bit first\n");
        }
        fw.append(" * \n");
        fw.append(" * @author automatically generated\n");
        fw.append(" * @see ByteBasedBitPackingGenerator\n");
        fw.append(" *\n");
        fw.append("
indexr-codegen/src/main/java/io/indexr/vlt/codec/pack/PackingClassGen.java