ZstandardLoadOptions
Inheritance: java.lang.Object
public class ZstandardLoadOptions
Options with which ZstandardArchive is loaded from compressed file. Contains event raised on extraction.
Constructors
Constructor | Description |
---|---|
ZstandardLoadOptions() |
Methods
Method | Description |
---|---|
getExtractionProgressed() | Gets an event that is raised when some bytes have been extracted. |
setExtractionProgressed(Event<ProgressEventArgs> value) | Sets an event that is raised when some bytes have been extracted. |
ZstandardLoadOptions()
public ZstandardLoadOptions()
getExtractionProgressed()
public Event<ProgressEventArgs> getExtractionProgressed()
Gets an event that is raised when some bytes have been extracted.
long length = 10_000_000;
ZStandardLoadOptions loadOptions = new ZStandardLoadOptions();
loadOptions.setExtractionProgressed((sender, args) -> {
int percent = (int)((100 * args.getProceededBytes()) / length);
});
ZstandardArchive archive = new ZstandardArchive("archive.zst", loadOptions);
Event sender is the ZstandardArchive instance which extraction is progressed.
Returns: Event - an event that is raised when some bytes have been extracted
setExtractionProgressed(Event<ProgressEventArgs> value)
public void setExtractionProgressed(Event<ProgressEventArgs> value)
Sets an event that is raised when some bytes have been extracted.
long length = 10_000_000;
ZStandardLoadOptions loadOptions = new ZStandardLoadOptions();
loadOptions.setExtractionProgressed((sender, args) -> {
int percent = (int)((100 * args.getProceededBytes()) / length);
});
ZstandardArchive archive = new ZstandardArchive("archive.zst", loadOptions);
Event sender is the ZstandardArchive instance which extraction is progressed.
Parameters:
Parameter | Type | Description |
---|---|---|
value | com.aspose.zip.Event<com.aspose.zip.ProgressEventArgs> | an event that is raised when some bytes have been extracted |