Package xbird.util.compress

Examples of xbird.util.compress.LZSSCodec


            probe(out.toByteArray_clear());
        }
    }

    public void probe(byte[] input) {
        LZSSCodec codec = new LZSSCodec();
        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

Related Classes of xbird.util.compress.LZSSCodec

Copyright © 2018 www.massapicom. 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.