Class Bzip2CompressionSettings


  • public class Bzip2CompressionSettings
    extends CompressionSettings

    Settings for Bzip2 compression within a ZIP archive.

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

    • Constructor Detail

      • Bzip2CompressionSettings

        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:
        blockSize - Block size in hundreds of kilobytes.
        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - Block size is not between 1 and 9.
      • 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);
             }
         
    • Method Detail

      • getBlockSize

        public final int getBlockSize()

        Block size in hundreds of kilobytes.

        Returns:
        block size in hundreds of kilobytes