Package org.toubassi.femtozip.models

Examples of org.toubassi.femtozip.models.VariableIntCompressionModel.compress()


        String source = "12345";
        byte[] sourceBytes = source.getBytes("UTF-8");
        VariableIntCompressionModel model = new VariableIntCompressionModel();
        model.build(new ArrayDocumentList(sourceBytes));
       
        byte[] compressedBytes = model.compress(sourceBytes);

        Assert.assertEquals(2, compressedBytes.length);

        byte[] decompressedBytes = model.decompress(compressedBytes);
        String decompressedString = new String(decompressedBytes);
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.