Class ZipArchiveItem
Represents single item inside zip archive. It can be either folder or file.
Implements
Inherited Members
Namespace: Syncfusion.Compression.Zip
Assembly: Syncfusion.Compression.NET.dll
Syntax
public class ZipArchiveItem : IDisposable
Constructors
ZipArchiveItem(ZipArchive, string, Stream, bool, 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 | |
| string | itemName | Name of the item (can be relative or absolute path). |
| Stream | streamData | Stream data. |
| bool | 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 |
|---|
| bool |
CompressedSize
Compressed data size.
Declaration
public long CompressedSize { get; }
Property Value
| Type |
|---|
| long |
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 |
|---|
| bool |
Crc32
Crc.
Declaration
[CLSCompliant(false)]
public uint Crc32 { get; }
Property Value
| Type |
|---|
| uint |
DataStream
Stream with item's data.
Declaration
public Stream DataStream { get; }
Property Value
| Type |
|---|
| 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 |
|---|
| string |
OptimizedDecompress
Declaration
public bool OptimizedDecompress { get; set; }
Property Value
| Type |
|---|
| bool |
OriginalSize
Original (not compressed) data size.
Declaration
public long OriginalSize { get; }
Property Value
| Type |
|---|
| long |
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 |
|---|---|---|
| Stream | stream | Stream to copy. |
Returns
| Type | Description |
|---|---|
| Stream | Created stream. |
Dispose()
A method to release allocated unmanaged resources.
Declaration
public void Dispose()
~ZipArchiveItem()
Finilizer.
Declaration
protected ~ZipArchiveItem()
ResetFlags()
Declaration
public void ResetFlags()
Update(Stream, bool)
Updates internal data stream.
Declaration
public void Update(Stream newDataStream, bool controlStream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | newDataStream | New stream to set. |
| bool | controlStream | Indicates whether item should conrol new stream. |