Class ZipArchiveItem
Represents single item inside zip archive. It can be either folder or file.
Inheritance
Implements
Namespace: Syncfusion.Compression.Zip
Assembly: Syncfusion.Compression.Portable.dll
Syntax
public class ZipArchiveItem : Object, IDisposable
Constructors
ZipArchiveItem(ZipArchive, String, Stream, Boolean, FileAttributes)
Creates new instance of the zip item.
Declaration
public ZipArchiveItem(ZipArchive archive, string itemName, Stream streamData, bool controlStream, FileAttributes attributes)
Parameters
Type | Name | Description |
---|---|---|
ZipArchive | archive | |
System.String | itemName | Name of the item (can be relative or absolute path). |
System.IO.Stream | streamData | Stream data. |
System.Boolean | controlStream | Indicates whether item controls stream and must close it when item finish its work. |
FileAttributes | attributes |
Properties
Compressed
Indicates whether internal stream contains compressed data.
Declaration
public bool Compressed { get; }
Property Value
Type |
---|
System.Boolean |
CompressedSize
Compressed data size.
Declaration
public long CompressedSize { get; }
Property Value
Type |
---|
System.Int64 |
CompressionLevel
Gets/sets item's compression level.
Declaration
public CompressionLevel CompressionLevel { get; set; }
Property Value
Type |
---|
CompressionLevel |
CompressionMethod
Compression method.
Declaration
public CompressionMethod CompressionMethod { get; set; }
Property Value
Type |
---|
CompressionMethod |
ControlStream
Indicates whether this item controls it's data stream.
Declaration
public bool ControlStream { get; }
Property Value
Type |
---|
System.Boolean |
Crc32
Crc.
Declaration
public uint Crc32 { get; }
Property Value
Type |
---|
System.UInt32 |
DataStream
Stream with item's data.
Declaration
public Stream DataStream { get; }
Property Value
Type |
---|
System.IO.Stream |
ExternalAttributes
Gets / sets item's external attributes.
Declaration
public FileAttributes ExternalAttributes { get; set; }
Property Value
Type |
---|
FileAttributes |
ItemName
Name of the archive item.
Declaration
public string ItemName { get; set; }
Property Value
Type |
---|
System.String |
OptimizedDecompress
Declaration
public bool OptimizedDecompress { get; set; }
Property Value
Type |
---|
System.Boolean |
OriginalSize
Original (not compressed) data size.
Declaration
public long OriginalSize { get; }
Property Value
Type |
---|
System.Int64 |
Methods
Clone()
Declaration
public ZipArchiveItem Clone()
Returns
Type |
---|
ZipArchiveItem |
CloneStream(Stream)
Creates copy of the stream.
Declaration
public static Stream CloneStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream to copy. |
Returns
Type | Description |
---|---|
System.IO.Stream | Created stream. |
Dispose()
A method to release allocated unmanaged resources.
Declaration
public void Dispose()
Finalize()
Finilizer.
Declaration
protected override void Finalize()
ResetFlags()
Declaration
public void ResetFlags()
Update(Stream, Boolean)
Updates internal data stream.
Declaration
public void Update(Stream newDataStream, bool controlStream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | newDataStream | New stream to set. |
System.Boolean | controlStream | Indicates whether item should conrol new stream. |