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

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


            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


            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) {
            want.fail();
View Full Code Here

                File output = File.createTempFile("compress_", "jkt");
                comp.compressTo(input, output);

                Compressor icomp = (Compressor) PackableObject.identifyByHeader(output, Arrays.asList(comps));

                InputStream decrypt = icomp.decompress(output);
                byte[] result = NioUtils.read(decrypt);
                check(data, result);
            }

        } 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.