Class ZipArchiveItem
Represents single item inside zip archive. It can be either folder or file.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Compression.Zip
Assembly: Syncfusion.Compression.Base.dll
Syntax
public class ZipArchiveItem : 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. |
System.IO.FileAttributes | attributes |
Properties
Compressed
Indicates whether internal stream contains compressed data.
Declaration
public bool Compressed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CompressedSize
Compressed data size.
Declaration
public long CompressedSize { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
CompressionLevel
Gets/sets item's compression level.
Declaration
public CompressionLevel CompressionLevel { get; set; }
Property Value
Type | Description |
---|---|
CompressionLevel |
CompressionMethod
Compression method.
Declaration
public CompressionMethod CompressionMethod { get; set; }
Property Value
Type | Description |
---|---|
CompressionMethod |
ControlStream
Indicates whether this item controls it's data stream.
Declaration
public bool ControlStream { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Crc32
Crc.
Declaration
[CLSCompliant(false)]
public uint Crc32 { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
DataStream
Stream with item's data.
Declaration
public Stream DataStream { get; }
Property Value
Type | Description |
---|---|
System.IO.Stream |
ExternalAttributes
Gets / sets item's external attributes.
Declaration
public FileAttributes ExternalAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.IO.FileAttributes |
ItemName
Name of the archive item.
Declaration
public string ItemName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OemCodePage
Gets current OEM code page.
Declaration
public static int OemCodePage { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
OptimizedDecompress
Declaration
public bool OptimizedDecompress { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
OriginalSize
Original (not compressed) data size.
Declaration
public long OriginalSize { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
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 void Finalize()
ResetFlags()
Declaration
public void ResetFlags()
Update(ZippedContentStream)
Declaration
public void Update(ZippedContentStream stream)
Parameters
Type | Name | Description |
---|---|---|
ZippedContentStream | stream |
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. |