Package com.alibaba.otter.node.etl.common.io.compress

Examples of com.alibaba.otter.node.etl.common.io.compress.Compressor.compress()


            byte[] result;
            for (int i = 0; i < comps.length; i++) {
                ByteArrayInputStream input = new ByteArrayInputStream(data);
                Compressor comp = comps[i];
                // 基于流的处理
                InputStream encrypt = comp.compress(input);
                InputStream decrypt = comp.decompress(encrypt);
                result = NioUtils.read(decrypt);
                check(data, result);
                encrypt.close();
                decrypt.close();
View Full Code Here


        try {
            byte[] data = getBlock(20 * 1024);
            for (int i = 0; i < comps.length; i++) {
                Compressor comp = comps[i];
                // 基于流的处理
                byte[] encrypt = comp.compress(data);
                byte[] decrypt = comp.decompress(encrypt);
                check(data, decrypt);
            }

        } catch (Exception e) {
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.