Examples of LZFCodec


Examples of xbird.util.compress.LZFCodec

            probe(out.toByteArray_clear());
        }
    }

    public void probe(byte[] input) {
        LZFCodec codec = new LZFCodec();
        byte[] compressed = codec.compress(input);
        byte[] decompressed = codec.decompress(compressed);
        ArrayAssert.assertEquals(input, decompressed);
        float ratio = (float) compressed.length / (float) input.length;
        System.out.println("Original: " + input.length + ", Compressed: " + compressed.length
                + ", Compression ratio: " + Float.toString(ratio * 100.0f));
    }
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.