public class XzStep extends Object implements Step
Step
to compress a file with XZ / LZMA2.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COMPRESSION_LEVEL |
Constructor and Description |
---|
XzStep(ProjectFilesystem filesystem,
Path sourceFile,
int compressionLevel)
Creates an XzStep to compress a file with XZ at a user supplied compression level .
|
XzStep(ProjectFilesystem filesystem,
Path sourceFile,
Path outputPath,
int compressionLevel)
Creates an XzStep to compress a file with the given XZ compression level and output path.
|
Modifier and Type | Method and Description |
---|---|
StepExecutionResult |
execute(ExecutionContext context) |
String |
getDescription(ExecutionContext context) |
Path |
getDestinationFile() |
String |
getShortName() |
public static final int DEFAULT_COMPRESSION_LEVEL
public XzStep(ProjectFilesystem filesystem, Path sourceFile, Path outputPath, int compressionLevel)
Decompression will require up to 64MiB of RAM.
sourceFile
- file to compressoutputPath
- the desired output path.compressionLevel
- level of compression (from 0-9)public XzStep(ProjectFilesystem filesystem, Path sourceFile, int compressionLevel)
The destination file will be sourceFile
with the added .xz
extension.
Decompression will require up to 64MiB of RAM.
sourceFile
- file to compresscompressionLevel
- value from 0 to 9. Higher values result in better compression, but also
need more time to compress and will need more RAM to decompress.public StepExecutionResult execute(ExecutionContext context) throws IOException
execute
in interface Step
IOException
public Path getDestinationFile()
public String getDescription(ExecutionContext context)
getDescription
in interface Step
public String getShortName()
getShortName
in interface Step