@@ -0,0 +1,2041 @@
+package enc;%0A%0Aimport java.io.IOException;%0Aimport java.util.Arrays;%0A%0Aimport org.apache.parquet.column.values.bitpacking.BytePacker;%0Aimport org.apache.parquet.column.values.bitpacking.Packer;%0A%0Apublic class GenerateBitPackingTestCases %7B%0A    private static void printBytes(byte%5B%5D bytes) %7B%0A        for (byte b : bytes) %7B%0A            System.out.printf(%220x%2502X, %22, b);%0A        %7D%0A    %7D%0A%0A    private static void printTestCase(BytePacker bp, int%5B%5D in) %7B%0A        byte%5B%5D out = new byte%5Bbp.getBitWidth()%5D;%0A        bp.pack8Values(in, 0, out, 0);%0A%0A        // %7B3, %5B%5Dbyte%7B0x00, 0x00, 0x00%7D, %5B8%5Dint32%7B0, 0, 0, 0, 0, 0, 0, 0%7D%7D,%0A        System.out.print(%22%7B%22 + bp.getBitWidth() + %22, %5B%5Dbyte%7B%22);%0A        printBytes(out);%0A        System.out.print(%22%7D, %5B8%5Dint32%22);%0A        System.out.print(Arrays.toString(in).replace(%22%5B%22, %22%7B%22)%0A                .replace(%22%5D%22, %22%7D%22));%0A        System.out.println(%22%7D,%22);%0A    %7D%0A%0A    private static void generate1() %7B%0A        BytePacker packer = Packer.LITTLE_ENDIAN.newBytePacker(1);%0A        printTestCase(packer, new int%5B%5D %7B 1, 0, 1, 1, 0, 0, 1, 0 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 0, 0, 0, 0, 0, 0, 0, 0 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 1, 1, 1, 1, 1, 1, 1, 1 %7D);%0A    %7D%0A%0A    private static void generate2() %7B%0A        BytePacker packer = Packer.LITTLE_ENDIAN.newBytePacker(2);%0A        printTestCase(packer, new int%5B%5D %7B 0, 0, 0, 0, 0, 0, 0, 0 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 1, 1, 1, 1, 1, 1, 1, 1 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 2, 2, 2, 2, 2, 2, 2, 2 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 0, 1, 2, 2, 1, 0, 0, 1 %7D);%0A    %7D%0A%0A    private static void generate3() %7B%0A        BytePacker packer = Packer.LITTLE_ENDIAN.newBytePacker(3);%0A        printTestCase(packer, new int%5B%5D %7B 0, 0, 0, 0, 0, 0, 0, 0 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 0, 1, 2, 3, 4, 5, 6, 7 %7D);%0A        printTestCase(packer, new int%5B%5D %7B 7, 6, 5, 4, 3, 2, 1, 0 %7D);%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        generate1();%0A        generate2();%0A        generate3();%0A    %7D%0A%7D%0A

add class to generate bit packing test cases