Package com.aspose.zip
Enum ParallelCompressionMode
- java.lang.Object
-
- java.lang.Enum<ParallelCompressionMode>
-
- com.aspose.zip.ParallelCompressionMode
-
- All Implemented Interfaces:
Serializable,Comparable<ParallelCompressionMode>
public enum ParallelCompressionMode extends Enum<ParallelCompressionMode>
Options of usage parallel compression facility.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ParallelCompressionModevalueOf(String name)Returns the enum constant of this type with the specified name.static ParallelCompressionMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Never
public static final ParallelCompressionMode Never
Do not compress in parallel.
try (Archive archive = new Archive()) { archive.createEntry("filename.bin", "filename.bin"); archive.createEntry("filename1.bin", "filename1.bin"); archive.createEntry("filename2.bin", "filename2.bin"); ParallelOptions parallelOptions = new ParallelOptions(); parallelOptions.setParallelCompressInMemory(ParallelCompressionMode.Never); ArchiveSaveOptions archiveSaveOptions = new ArchiveSaveOptions(); archiveSaveOptions.setParallelOptions(parallelOptions); archive.save(destination, archiveSaveOptions); }
-
Always
public static final ParallelCompressionMode Always
Do compress in parallel. Beware of a drain on memory.
try (Archive archive = new Archive()) { archive.createEntry("filename.bin", "filename.bin"); archive.createEntry("filename1.bin", "filename1.bin"); archive.createEntry("filename2.bin", "filename2.bin"); ParallelOptions parallelOptions = new ParallelOptions(); parallelOptions.setParallelCompressInMemory(ParallelCompressionMode.Always); ArchiveSaveOptions archiveSaveOptions = new ArchiveSaveOptions(); archiveSaveOptions.setParallelOptions(parallelOptions); archive.save(destination, archiveSaveOptions); }
-
Auto
public static final ParallelCompressionMode Auto
Decide whether parallel compression will be used based on the entries. This option may compress in parallel some entries only.
try (Archive archive = new Archive()) { archive.createEntry("filename.bin", "filename.bin"); archive.createEntry("filename1.bin", "filename1.bin"); archive.createEntry("filename2.bin", "filename2.bin"); ParallelOptions parallelOptions = new ParallelOptions(); parallelOptions.setParallelCompressInMemory(ParallelCompressionMode.Auto); ArchiveSaveOptions archiveSaveOptions = new ArchiveSaveOptions(); archiveSaveOptions.setParallelOptions(parallelOptions); archive.save(destination, archiveSaveOptions); }
-
-
Method Detail
-
values
public static ParallelCompressionMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ParallelCompressionMode c : ParallelCompressionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ParallelCompressionMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-