Lz4Archive.Extract
Contents
[
Hide
]Extract(string)
Extracts the archive to the file by path.
public FileInfo Extract(string path)
Parameter | Type | Description |
---|---|---|
path | String | The path to destination file. If the file already exists, it will be overwritten. |
Return Value
Info of an extracted file.
Exceptions
exception | condition |
---|---|
EndOfStreamException | Source stream is too short. |
InvalidDataException | Wrong bytes found while decoding. |
NotSupportedException | This LZ4 version is not supported. |
OperationCanceledException | In .NET Framework 4.0 and above: Thrown when the extraction is canceled via the provided cancellation token. |
ObjectDisposedException | Archive has been disposed and cannot be used. |
See Also
- class Lz4Archive
- namespace Aspose.Zip.Lz4
- assembly Aspose.Zip
Extract(Stream)
Extracts the archive to the stream provided.
public void Extract(Stream destination)
Parameter | Type | Description |
---|---|---|
destination | Stream | Destination stream. Must be writable. |
Exceptions
exception | condition |
---|---|
ArgumentException | destination does not support writing. |
EndOfStreamException | Source stream is too short. |
InvalidDataException | Wrong bytes found while decoding. |
NotSupportedException | This LZ4 version is not supported. |
InvalidOperationException | The archive is prepared for composition. |
OperationCanceledException | In .NET Framework 4.0 and above: Thrown when the extraction is canceled via the provided cancellation token. |
ObjectDisposedException | Archive has been disposed and cannot be used. |
Examples
using (var archive = new Lz4Archive("archive.lz4"))
{
archive.Extract(httpResponseStream);
}
See Also
- class Lz4Archive
- namespace Aspose.Zip.Lz4
- assembly Aspose.Zip