public boolean load() { return load(null); }
public IntelDeflaterFactory(File tmpDir) { intelDeflaterSupported = new IntelDeflater().load(tmpDir); }
public Deflater makeDeflater(final int compressionLevel, final boolean nowrap) { boolean intelDeflaterSupported = new IntelDeflater().load(tmpDir); if (intelDeflaterSupported) { if ((compressionLevel == 1 && nowrap) || compressionLevel != 1) { usingIntelDeflater = true; return new IntelDeflater(compressionLevel, nowrap); } } logger.warn("IntelDeflater is not supported, using Java.util.zip.Deflater"); usingIntelDeflater = false; return new Deflater(compressionLevel, nowrap); }
@Test public void testIntelDeflaterIsAvailable() { checkIntelSupported("IntelDeflater"); Assert.assertTrue(new IntelDeflater().load(null), "Intel shared library was not loaded. This could be due to a configuration error, or your system might not support it."); }