@Override
    void pack(Object i, Buffer opb) {
        InfoFloor1 info = (InfoFloor1) i;

        int count = 0;
        int rangebits;
        int maxposit = info.postlist[1];
        int maxclass = -1;

        /* save out partitions */
        opb.write(info.partitions, 5); /* only 0 to 31 legal */

        for (int j = 0; j < info.partitions; j++) {
            opb.write(info.partitionclass[j], 4); /* only 0 to 15 legal */

            if (maxclass < info.partitionclass[j]) {
                maxclass = info.partitionclass[j];
            }
        }

        /* save out partition classes */
        for (int j = 0; j < maxclass + 1; j++) {
            opb.write(info.class_dim[j] - 1, 3); /* 1 to 8 */

            opb.write(info.class_subs[j], 2); /* 0 to 3 */

            if (info.class_subs[j] != 0) {
                opb.write(info.class_book[j], 8);
            }
            for (int k = 0; k < (1 << info.class_subs[j]); k++) {
                opb.write(info.class_subbook[j][k] + 1, 8);
            }
        }

        /* save out the post list */
        opb.write(info.mult - 1, 2); /* only 1,2,3,4 legal now */

        opb.write(Util.ilog2(maxposit), 4);
        rangebits = Util.ilog2(maxposit);

        for (int j = 0, k = 0; j < info.partitions; j++) {
            count += info.class_dim[info.partitionclass[j]];
            for (; k < count; k++) {
                opb.write(info.postlist[k + 2], rangebits);
            }
        }
    }