Package org.apache.hadoop.io.compress.zlib

Examples of org.apache.hadoop.io.compress.zlib.BuiltInZlibDeflater


      di.readFully(data);
      LOG.info("Original data is " + data.length + " bytes.");

      ByteArrayInputStream bi = new ByteArrayInputStream(data);
      ByteArrayOutputStream bo = new ByteArrayOutputStream(data.length);
      BlockCompressorStream co = new BlockCompressorStream(bo, new BuiltInZlibDeflater());
      LOG.info("Starting.");
      long start = System.currentTimeMillis();
      IOUtils.copy(bi, co);
      co.close();
      long end = System.currentTimeMillis();
View Full Code Here


    byte[] rawData = generate(SIZE);
    try {
      CompressDecompressTester.of(rawData)
          .withCompressDecompressPair(new SnappyCompressor(), new SnappyDecompressor())
          .withCompressDecompressPair(new Lz4Compressor(), new Lz4Decompressor())
          .withCompressDecompressPair(new BuiltInZlibDeflater(), new BuiltInZlibInflater())
          .withTestCases(ImmutableSet.of(CompressionTestStrategy.COMPRESS_DECOMPRESS_SINGLE_BLOCK,
                      CompressionTestStrategy.COMPRESS_DECOMPRESS_BLOCK,
                      CompressionTestStrategy.COMPRESS_DECOMPRESS_ERRORS,
                      CompressionTestStrategy.COMPRESS_DECOMPRESS_WITH_EMPTY_STREAM))
          .test();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.io.compress.zlib.BuiltInZlibDeflater

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.