As of Picard release 1.104, Picard can optionally use a shared library on x86 unix systems to compress in BlockCompressedOutputStream, which is used to write BAM files. This library uses AVX code from the Intel Integrated Performance Primitives library to improve compression performance. We have found that on some processors, this library can reduce compression time by 1/3. It does not appear to hurt compression performance on non-Intel processors. This functionality is available in the Picard command-line tools, and in any program that uses the sam-jdk API, if the shared library is available to the code as described below.
Picard needs to load libIntelDeflater.so in order to use the faster compressor. This can be found in one of the following ways:
When running a Picard command-line program, the preamble that is printed when the program starts (containing username, hostname, Java version, etc.) will now additionally contain either "IntelDeflater" or "JdkDeflater" indicating whether or not libIntelDeflater.so is being used.
In order to suppress use of this library, pass -Dsamjdk.try_use_intel_deflater=false on the java command line.
Note that the Java wrapper for this functionality is dynamically linked, so developers who repackaged Picard classes in their own jars should make sure to include all the classes in net.sf.samtools.util.zip in order to make libIntelDeflater available.