Class LzxArchiveEntry
Namespace: Aspose.Zip.Lzx
Assembly: Aspose.Zip.dll (25.12.0)
Represents a single file within LZX archive.
public class LzxArchiveEntry : IArchiveFileEntryInheritance
Implements
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Properties
Commentary
Gets the commentary.
public string Commentary { get; }Property Value
CompressedSize
Gets size of the compressed file.
public uint CompressedSize { get; }Property Value
IsDirectory
Gets a value indicating whether this entry is a directory.
public bool IsDirectory { get; }Property Value
Length
Gets the length of the entry in bytes.
public long? Length { get; }Property Value
long ?
ModificationTime
Gets the last modified time of the entry.
public DateTime ModificationTime { get; }Property Value
Name
Gets name of the entry.
public string Name { get; }Property Value
Remarks
Archives for compression only, such as gzip, bzip2, lzip, lzma, xz, z has name “File.bin” unless another name can be found in headers.
UncompressedSize
Gets size of the original file.
public uint UncompressedSize { get; }Property Value
Methods
Extract(string)
Extracts Lzx archive entry to a filesystem by path.
public FileSystemInfo Extract(string path)Parameters
path string
Path to file which will store decompressed data.
Returns
System.IO.FileSystemInfoInstance containing extracted data.
Examples
using (FileStream lzxFile = File.Open(sourceFileName, FileMode.Open))
{
using (var archive = new LzxArchive(lhaFile))
{
archive.Entries[0].Extract("extracted.bin");
}
}Exceptions
Archive headers and service information were not read.
path is null.
The caller does not have the required permission to access.
The path is empty, contains only white spaces, or contains invalid characters.
Access to file path is denied.
The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
File at path contains a colon (:) in the middle of the string.
Checksum mismatch for headers or data. - or - Archive is corrupted.
In .NET Framework 4.0 and above: Thrown when the extraction is canceled via the provided cancellation token.
Invalid compression method.
Extract(Stream)
Extracts the entry to the stream provided.
public void Extract(Stream destination)Parameters
destination Stream
Destination stream. Must be writable.
Exceptions
destination does not support writing.
Checksum mismatch for headers or data. - or - Archive is corrupted.
Destination stream is null.
Invalid compression method.
In .NET Framework 4.0 and above: Thrown when the extraction is canceled via the provided cancellation token.