/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
/** * Return the appropriate implementation of the zlib decompressor. * * @param conf configuration * @return the appropriate implementation of the zlib decompressor. */ public static Decompressor getZlibDecompressor(Configuration conf) { return (isNativeZlibLoaded(conf)) ? new ZlibDecompressor() : new BuiltInZlibInflater(); }
@Test public void testCompressorDecompressor() { // no more for this data int SIZE = 44 * 1024; 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(); } catch (Exception ex) { fail("testCompressorDecompressor error !!!" + ex); } }
@Test public void testCompressorDecompressor() { // no more for this data int SIZE = 44 * 1024; 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(); } catch (Exception ex) { fail("testCompressorDecompressor error !!!" + ex); } }