Class BZip2Codec

java.lang.Object
org.apache.hadoop.io.compress.BZip2Codec
All Implemented Interfaces:
Configurable, CompressionCodec, SplittableCompressionCodec

@Public @Evolving public class BZip2Codec extends Object implements Configurable, SplittableCompressionCodec
This class provides output and input streams for bzip2 compression and decompression. It uses the native bzip2 library on the system if possible, else it uses a pure-Java implementation of the bzip2 algorithm. The configuration parameter io.compression.codec.bzip2.library can be used to control this behavior. In the pure-Java mode, the Compressor and Decompressor interfaces are not implemented. Therefore, in that mode, those methods of CompressionCodec which have a Compressor or Decompressor type argument, throw UnsupportedOperationException. Currently, support for splittability is available only in the pure-Java mode; therefore, if a SplitCompressionInputStream is requested, the pure-Java implementation is used, regardless of the setting of the configuration parameter mentioned above.