Bzip2CompressionSettings

Inheritance: java.lang.Object, com.aspose.zip.CompressionSettings

public class Bzip2CompressionSettings extends CompressionSettings

Settings for Bzip2 compression method.

bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. See more: Bzip2

Constructors

ConstructorDescription
Bzip2CompressionSettings(int blockSize)Initializes a new instance of the Bzip2CompressionSettings class.
Bzip2CompressionSettings()Initializes a new instance of the Bzip2CompressionSettings class with default block size, equals to 9 hundred of kilobytes.

Methods

MethodDescription
getBlockSize()Block size in hundreds of kilobytes.

Bzip2CompressionSettings(int blockSize)

public Bzip2CompressionSettings(int blockSize)

Initializes a new instance of the Bzip2CompressionSettings class.


     try (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings(1)))) {
         archive.createEntry("data.bin", "data.bin");
         archive.save(zipFile);
     }
 

Parameters:

ParameterTypeDescription
blockSizeintBlock size in hundreds of kilobytes.

Bzip2CompressionSettings()

public Bzip2CompressionSettings()

Initializes a new instance of the Bzip2CompressionSettings class with default block size, equals to 9 hundred of kilobytes.


     try (Archive archive = new Archive(new ArchiveEntrySettings(new Bzip2CompressionSettings()))) {
         archive.createEntry("data.bin", "data.bin");
         archive.save(zipFile);
     }
 

getBlockSize()

public final int getBlockSize()

Block size in hundreds of kilobytes.

Returns: int - block size in hundreds of kilobytes