Package org.h2.tools

Examples of org.h2.tools.CompressTool.expand()


            for (int j = 0; j < i; j++) {
                buff.append((char) ('1' + j));
            }
            String test = buff.toString();
            byte[] in = test.getBytes();
            assertEquals(in, utils.expand(utils.compress(in, "LZF")));
        }
    }

    private void testDatabase() throws Exception {
        deleteDb("memFS:compress");
View Full Code Here


            CompressTool utils = CompressTool.getInstance();
            // level 9 is highest, strategy 2 is huffman only
            for (String a : new String[] { "LZF", "No", "Deflate", "Deflate level 9 strategy 2" }) {
                long time = System.currentTimeMillis();
                byte[] out = utils.compress(buff, a);
                byte[] test = utils.expand(out);
                if (testPerformance) {
                    System.out.println("p:" + pattern + " len: " + out.length + " time: " + (System.currentTimeMillis() - time) + " " + a);
                }
                assertEquals(buff.length, test.length);
                assertEquals(buff, test);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.