Introduction

Polar Zip for .NET is a complete compression solution for software developers working in a .NET environment. When using it, you can experience advantages of both .NET environment and our compression component.

Polar ZIP for .NET enables you to implement easily wide range of zipping and unzipping features:

1. Zip actions

  • Create a new zip file;

  • Delete files in a zip file;

  • Compress entire directories and their contents or a list of directories;

  • Compress only files newer than those already in the zip file (Refresh);

  • Compress files and add them to a zip file (Update);

  • Delete files after zipping them (Move);

  • Have specified types of files directly copied into a zip file without compression;

2. UnZIP Actions

  • Decompress files from a zip file;

  • Specify the directory where files will be decompressed to;

  • Only decompress files that are newer than the ones already existing on disk (Refresh);

3. Multi-disk and multi-file archives

  • Reads and writes zip files that span multiple disks;

  • Creates multi-part zip files directly to a hard drive;

  • Converts multi-file archives to one single zip file;

  • Converts an existing zip file to a multi-file or a multi-disk archive;

  • Events during disk spanning

4. Stream compression

  • Compress .NET streams

5. General zip information

  • Obtain a detailed list of files in a zip file;

  • Use wildcards to specify the files to be processed;

  • Specify the name and location of a zip file;

  • Events provide data such as the file size before compression, the compressed file size and other information as it becomes available;

  • You have full control over zip comments;

6. Tools

  • Specify different encryption and decryption passwords for each file if needed;

  • Tests the integrity, repairs corrupted zip files and reports any inconsistencies found;

  • Make the zip file date the same as the newest item;

7. General process information

  • Set the compression level;

  • Work on temporary copies of zip files for maximum safety. You can specify the location of the temporary zip file;

  • All operations can be aborted;

  • Notifies your application whenever a file is being zipped, unzipped, updated, deleted, etc.;

  • Provides the status of the progress by file and globally with the data shown as percentages, bytes and file counts;

  • You can easily update your progress bars directly with this information;

  • Limits file processing based on file dates: does not operate on files modified after/on the date you specify.


Technical Support

Support HelpDesk

If you have a problem using Polar ZIP for .NET and you cannot find an answer to your specific problem in this help file, please feel free to post your query in our HelpDesk at www.polarsoftware.com/support/helpdesk/index.asp .

Polar

Put Supavla 1

HR-21000 Split

Croatia, Europe

Phone:

+385 21 380 770

Fax:

+385 21 380 771

URL:

www.polarsoftware.com

E-mail:

sales@polarsoftware.com

ENewsletter

Like to hear news right from the source? We invite you to subscribe to our free e-mail newsletter. Published periodicaly, the Polar eNewsletter contains the latest news about Polar software products, services, tips & handy suggestions, special events at our web site as well as promotional offers. www.polarsoftware.com/support/newsletter/index.html


ZIP Archive Format

The ZIP archive format is probably the most popular compression and archiving file format used. Use Polar ZIP for .NET to create and manipulate industry-standard ZIP archives in a second, with only a few lines of code!

1. What is a ZIP file?

ZIP files are archives used for distributing and storing files and may contain one or more files. Usually the files archived in a ZIP file are compressed to save space.

2. Can you tell me more about the ZIP archive format?

The ZIP archive format is the most common and the most popular archive format. It was introduced by PKWARE in the late 1980's as a response to the compression needs of the computer market. Their product PKZIP not only introduced the ZIP file format but it also brought a reliable alternative to the plethora of compression utilities on the market in those times.

The speed and amount of compression, flexibility, robustness, and reliability PKZIP possessed, prompted many to convert their archives to the ZIP file format virtually overnight. Another big reason for the success was the decision by PKWARE to dedicate the ZIP file format specification and ZIP file extension name to the public domain.

The decision to keep the ZIP file format an open standard allowed many other zipping programs to join the market, as well as many software components supporting this standard as well. With Polar ZIP you can create and manipulate industry-standard ZIP archives in a second, with only a few lines of code!

3. Why do people use ZIP files?

ZIP files save time and space and make downloading software and transferring e-mail attachments faster. Typical uses for ZIP files include:

Easier upload/download

Most archive files available on FTP & web sites are distributed as ZIP archives. Two benefits of using archives for electronic file distribution are that only one file transfer operation (download) is required to obtain all related files and the file transfer time is minimized because the files in an archive are compressed.

Easier distribution

It is often useful to send a group of related files to an associate. Rather than distributing individual files it is often easier to distribute the files as an archive to benefit from the file grouping and compression.

Easier archiving

Some files are important but used infrequently. To save disk space simply compress these files into an archive when they are not used and decompress them only when needed.


Licence agreement

Polar, d.o.o.

Put Supavla 1

21000 Split

Croatia, Europe

Phone/Fax: (+385 21) 380770 / (+385 21) 380771

Web site: http://www.polarsoftware.com/

SINGLE USER SOURCE CODE LICENSE AGREEMENT

IMPORTANT - READ CAREFULLY!

By installing this software package, or exercising your rights to

make and use copies of the Software (as may be provided for below),

you agree to be bound by the terms of this Polar Software Source Code

License Agreement. If you do not agree to the terms of this

Agreement, promptly return this package to the place from which you

obtained it within 30 days for a full refund.

If you would like specific rights not granted in this agreement,

please contact Polar for more information.

Polar Software License Agreement

The enclosed software, including, but not limited to, one or more of

the following: source code, object code, dynamic link libraries,

static libraries, header files, sample programs, utility programs,

Makefiles and scripts, together with the accompanying documentation

(collectively known as the "Software") is owned by Polar or its

suppliers and is protected by international copyright laws and

treaties. Therefore, you must treat the Software like any copyrighted

material (e.g., a book or musical recording) except that you may make

either (a) one backup copy of the Software solely for backup purposes,

or (b) transfer the Software to a hard disk and keep the original

copy solely for backup purposes.

Polar grants to you (one software programmer) the limited

right to use only one copy of the Software on a single computer

(typically one personal computer) in the manner set forth in this

agreement. Each Software Programmer must have his or her own license

to use the Software.

Subject to the restrictions contained in this agreement, you MAY:

a) Incorporate the dynamic link libraries and statically linked

libraries into software application products that you develop.

b) Modify (i.e. modify the source code and rebuild) the dynamic link

libraries and statically linked libraries and incorporate the modified

dynamic link libraries and statically linked libraries into software

application products that you develop.

c) Make and distribute copies of the dynamic link libraries and

statically linked libraries of the Software as incorporated into

software application products that you develop provided that the

Software, or other Polar products, do not constitute a major portion

of the value of your product.

d) Use and modify the source code version of those portions of the

Software that are identified in the documentation as the Sample Code

("SAMPLE CODE"), provided you do not distribute the SAMPLE CODE, or

any modified version of the SAMPLE CODE, in source code form.

Notwithstanding any provisions in this agreement to the contrary, you

may NOT:

a) Distribute in any manner any of the header files, source code,

SAMPLE CODE, Makefiles, object modules or independent static libraries

of the Software.

b) Make telecommunication transmittal of the Software.

c) Distribute any portion of the Software or any derivative of any

portion of the Software in a software development product or otherwise

in competition with Polar's distribution of the Software.

d) Disclose any source codes of the Software to any person or entity.

The source codes of the Software are valuable assets of Polar.

You agree to keep all source codes of the Software in confidence.

You may not transfer or assign the Software or your rights under

this agreement.

Limited Warranty

Polar warrants to you (the original licensee only) that the unaltered

Software will substantially perform the functions described in the

documentation for a period of 60 days after the date of delivery

of the Software to you. Polar's sole obligation under this warranty

shall be limited to using reasonable efforts to correct material,

documented, reproducible defects in the unaltered Software that you

describe and document to Polar during the 60-day period. In the event

that Polar fails to correct a material, documented, reproducible

defect within a reasonable period, Polar may, in Polar's discretion,

replace the defective Software, or refund to you the amount that you

paid Polar for the defective Software and cancel this agreement and

the licenses granted herein. In such event, you agree to return to

Polar all copies of the Software.

EXCEPT AS SPECIFICALLY PROVIDED IN THE PARAGRAPH IMMEDIATELY ABOVE,

POLAR MAKES NO WARRANTY, EXPRESS OR IMPLIED, INCLUDING, BUT NOT

LIMITED TO, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A

PARTICULAR PURPOSE. IN NO EVENT SHALL POLAR BE LIABLE FOR ANY

INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING

LOSS OF PROFITS) WHETHER BASED ON CONTRACT, TORT OR ANY OTHER LEGAL

THEORY, EVEN IF POLAR WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Polar will provide you (the original licensee only) with limited

technical support by electronic media for a period of 60 days after

delivery of the Software to you.

You can use your technical support rights by contacting us by:

a) using support web forms on our web site (http://www.polarsoftware.com)

b) using e-mail: support@polarsoftware.com

LIMITATION OF LIABILITY

IN NO EVENT WILL POLAR BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING

WITHOUT LIMITATION LOST PROFITS OR REVENUES, LOSS OF DATA, BUSINESS

INTERRUPTION LOSS, RECOVERY OR SUBSTITUTION COSTS, OR CLAIMS BY THIRD

PARTIES, OR OTHER INDIRECT INCIDENTAL OR CONSEQUENTIAL DAMAGES,

ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN

IF POLAR OR A POLAR DEALER HAS BEEN ADVISED OF THE POSSIBILITY OF

SUCH DAMAGES. IN NO CASE SHALL POLAR'S LIABILITY EXCEED THE AMOUNT OF

THE LICENSE FEE PAID BY YOU FOR THE SOFTWARE.

HIGH RISK ACTIVITIES

The Software is not fault-tolerant and is not designed, manufactured

or intended for use or resale as on-line control equipment in hazardous

environments requiring fail-safe performance, such as in the operation

of nuclear facilities, aircraft navigation or communication systems,

air traffic control, direct life support machines, or weapons systems,

in which the failure of the Software could lead directly to death,

personal injury, or severe physical or environmental damage

("High Risk Activities").

Polar and its suppliers specifically disclaim any express or implied

warranty of fitness for High Risk Activities.

GENERAL:

This agreement is governed by international copyright laws and

treaties. The prevailing party in any action or proceeding brought

in connection with a breach of this Agreement will be entitled to

reimbursement by the other party for costs and reasonable attorneys'

fees.

Any questions concerning this Agreement should be referred in writing

to Polar (see our address on top of this agreement).

COPYRIGHT NOTICE. Copyright © 2000-2003 Polar and/or its suppliers,

Put Supavla 1, 21000 Split, Croatia, Europe.

All rights reserved. Specifications subject to change without notice.

Any rights not expressly granted herein are reserved.

YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, AND BY OPENING THIS

SOFTWARE PACKAGE INDICATE YOUR ACCEPTANCE OF ITS TERMS AND CONDITIONS.

YOU ALSO AGREE THAT IT IS THE COMPLETE AGREEMENT BETWEEN US AND THAT IT

SUPERSEDES ANY PRIOR INFORMATION OR REPRESENTATIONS YOU RECEIVED RELATING

TO THE SUBJECT MATTER OF THIS AGREEMENT. NO POLAR DEALER, DISTRIBUTOR

REPRESENTATIVE OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATIONS OR

ADDITIONS TO THIS AGREEMENT.


ZipCompressionMethod Enumeration

Polar.Zip Namespace

ZipCompressionMethod Enumeration

ZipCompressionMethod enum contains supported compression types that can be used to create Zip archives.

[C#]

public enum ZipCompressionMethod

Members

Member name | Description
Stored | Stored compression type means that file/s added to the archive will not be compressed. Instead, they will stored in their original form.
Deflated | Polar Zip will use deflation compression algorithm to compress files.

See Also

ZipFileAttributes Enumeration


ZipFileAttributes Enumeration

ZipFileAttributes Enumeration

ZipCompressionMethod enum contains supported compression types that can be used to create Zip archives.

[C#]

[Flags]

public enum ZipFileAttributes

Members

Member name | Description
None | No specific attributes must be assigned in order to process the files.
ReadOnly | Read-only attribute required.
Hidden | Hidden attribute required.
System | System attribute required.
Volume | Volume Label attribute required.
Folder | Folder / directory attribute required.
Archive | Archive attribute required.
Normal | Normal attribute required.
Temporary | Temporary attribute required.
Encrypted | Encrypted attribute required.
Compressed | Compressed attribute required.

See Also

ZipCompressionMethod Enumeration


_ZipEventsGlavna

ZipEvents Class

Class contains events that can be raised by the ZipArchive class. ZipEvents is passed to the ZipArchive through ZipArchive constructor.

For a list of all members of this type, see ZipEvents members.

[C#]

public class ZipEvents

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll

See Also

ZipEvents members


_AnalyzingZipContents_Event0

ZipEvents.AnalyzingZipContents Event

Provides information about the progress when adding files to or updating an existing archive.

[C#]

public event AnalyzingZipContentsEventHandler AnalyzingZipContents;

Event Data

The event handler receives an argument of type AnalyzingZipContentsInfo containing data related to this event. The following PaintEventArgs properties provide information specific to this event.

Property | Description
FilesProcessed | Gets the number of the expression representing the current number of analyzed files.
TotalFiles | Gets the number of the expression representing the total number of files in an archive that need to be analyzed.
PercentProcessed | Gets the number of the expression representing the percentage of currently analyzed files.

Remarks

This event is used to give the user feedback information when adding new files or updating an archive that contains a large number of files. Before the archive is processed, the component needs to scan the existing files. This operation can be lengthy when the zip file contains five thousand files or more. This event is triggered up to a maximum of 101 times. If the zip file has more than 100 files it is triggered once for each possible value of the PercentProcessed parameter (from 0% to 100%), otherwise it will be triggered once for each file in the archive.

See Also


_FileCompressed_Event0

ZipEvents.FileCompressed Event

Occurs after the compression of each file.

[C#]

public event FileCompressedEventHandler FileCompressed;

Event Data

The event handler receives a FileCompressedInfo containing data related to the FileCompressed event. The following FileCompressedInfo properties provide information specific to this event.

Property | Description
FileName | Gets string expression containing the name of the compressed file.
OriginalFileSize | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedFileSize | Gets number or the expression containing the file size after compression (expressed in bytes)
Crc | Gets value of the expression representing the CRC value

See Also


_FileDecompressed_Event0

ZipEvents.FileDecompressed Event

Occurs after the decompression of each file.

[C#]

public event FileDecompressedEventHandler FileDecompressed;

Event Data

The event handler receives a FileDecompressedInfo containing data related to the FileDecompressed event. The following FileDecompressedInfo properties provide information specific to this event.

Property | Description
Filename | Gets string expression containing the name of the compressed file.
OriginalFileSize | Gets value of the expression containing the file size after decompression (expressed in bytes)
CompressedFileSize | Gets number or the expression containing the file size before decompression (expressed in bytes)
Crc | Gets value of the expression representing the CRC value

See Also


_FileInfo_Event0

FileInfo.Zip Namespace

ZipEvents.FileInfo Event

Occurs if the ListFiles method is executed. It is useful for getting information about files included in the zip archive.

[C#]

public event FileInfoEventHandler FileInfo;

Event Data

The event handler receives a FileInfoInfo containing data related to the FileInfo event. The following FileInfoInfo properties provide information specific to this event.

Property | Description
FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
UncompressedSize | Gets value expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value expression containing the file size before decompression (expressed in bytes)
CompressionRatio | Gets value expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | Gets numeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value expression representing the CRC value
LastModified | Gets value expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also


_FileStartedCompressing_Event0

ZipEvents.FileStartedCompressing Event

Occurs when each file starts compressing.

[C#]

public event FileStartedCompressingEventHandler FileStartedCompressing;

Event Data

The event handler receives a FileStartedCompressingInfo containing data related to the FileStartedCompressing event. The following FileStartedCompressingInfo properties provide information specific to this event.

Property | Description
FileName | Gets or sets string expression containing name of file
Comment | Gets or sets string expression containing file comment
SourceFilename | Gets string expression containing the original file name
Size | Gets number of the expression representing the original file size
Attributes | Gets or sets enumeration value of type ZipFileAttributes containing DOS file attributes
LastModified | Gets or sets number expression indicating day of last modification
Method | Gets or sets enumeration value of typeZipCompressionMethod indicating the compression method
Encrypted | Gets or sets boolean expression (true if a file is protected with a password, otherwise false)

See Also


FileStartedCompressing_Event0

ZipEvents.FileStartedDecompressing Event

Occurs when each file starts decompressing.

[C#]

public event FileStartedDecompressingEventHandler FileStartedDecompressing;

Event Data

The event handler receives a FileStartedDecompressingInfo containing data related to the FileStartedDecompressing event. The following FileStartedDecompressingInfo properties provide information specific to this event.

Property | Description
Filename | Gets string expression containing name of file
Comment | Gets string expression containing file comment
DestinationFilename | Gets or sets string expression containing path where the file will be stored
Size | Gets number expression containing file size before compression (expressed in bytes)
CompressedSize | Gets number expression containing file size before decompression (expressed in bytes)
CompressionRatio | Gets number expression containing compression ratio (If the UncompressedSize = 100, and the CompressedSize = 30, CompressionRatio = 70)
Attributes | Sets or gets enumeration value of type ZipFileAttributes containing DOS file attributes
LastModified | Gets or sets number expression indicating day of last modification
Crc | Gets number expression representing CRC value
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also


_FileStatus_Event0

ZipEvents.FileStatus Event

Occurs during the processing of the file (zipping/unzipping), as a result of the processing progress.

[C#]

public event FileStatusEventHandler FileStatus;

Event Data

The event handler receives a FileStatusInfo containing data related to the FileStatus event. The following FileStatusInfo properties provide information specific to this event.

Property | Description
Filename | Gets string expression containing the path and the filename of the file processed ( when zipping, this is the path and filename of the file exactly as it is being stored in the zip file. When unzipping or testing, this is the path and filename of the file exactly as it is currently stored in the zip file)
Size | Gets number of the expression representing the original file size
CompressedSize | Gets number of the expression representing the compressed file size
FileProcessed | Gets number of the expression representing the currently processed file size. (It counts from zero when each file processing begins.) This value is expressed in bytes
FilePercent | Gets number of the expression representing the ratio of the currently processed file part and total file size, expressed in percentages.
CompressionRatio | Gets number of the expression representing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70
TotalProcessed | Gets number of the expression representing the size that is currently processed, expressed in bytes.
TotalPercent | Gets number of the expression representing ratio of the currently processed file size and total processing file size, expressed in percents
FilePartProcessed | Gets number of the expression representing the size of the file processed since the last call of the FileStatus event
Crc | Gets number of the expression representing: zipping - CRC reached by the time,unzipping - CRC value
FileCompleted | Gets boolean expression representing the status of the processing (true if the processing is finished (last call of the FileStatus event), otherwise false ).

Remarks

This event gives you the status of the progress by file and globally in percentages, bytes and file counts. You can update your progress bars directly with this information

See Also


_GlobalInfo_Event0

ZipEvents.GlobalInfo Event

Occurs after the ProcessStarted event and before actual processing started.

[C#]

public event GlobalInfoEventHandler GlobalInfo;

Event Data

The event handler receives a GlobalInfoInfo containing data related to the GlobalInfo event. The following GlobalInfoInfo properties provide information specific to this event.

Property | Description
TotalSize | Get the number expression containing the total file size of all the files that are going to be processed: compressed or decompressed (expressed in bytes).
TotalFiles | Gets the number expression containing the total number of the files that are to be processed.

Remarks

This event is very useful for monitoring the progress of the processing, as it provides you with information about the file size to be processed when the process starts.

See Also


_SpanningMessage_Event0

ZipEvents.SpanningMessage Event

Occurs during the multi disk process and it helps in the exchange of messages between the user and the process of splitting the archive.

[C#]

public event SpanningMessageEventHandler SpanningMessage;

Event Data

The event handler receives a SpanningMessageInfo containing data related to the SpanningMessage event. The following SpanningMessageInfo properties provide information specific to this event.

Property | Description
Error | Gets error number.If Error = 0 there is no error; Message carries the string that describes the current change (e.g. "Transferring file: file name ").If Error <> 0 an error occurred; Message carries the string that describes current error
Message | Gets message description.

Remarks

The multi disk process starts after all the files are zipped into one single zip file and before it is going to be split into several files. This event occurs during this process and it informs the application about the possible changes (errors, transfer of each archive item, etc). Error determines the error that occurred: If Error = 0 there is no error; Message carries the string that describes the current change (e.g. "Transferring file: file name ").If Error <> 0 an error occurred; Message carries the string that describes current error.

See Also


_SpanningProcessStarted_Event0

ZipEvents.SpanningProcessStarted Event

Occurs when the process of splitting a zip file starts.

[C#]

public event SpanningProcessStartedEventHandler SpanningProcessStarted;

See Also


_SpanningProcessEnded_Event0

ZipEvents.SpanningProcessEnded Event

Occurs when the process of splitting a zip file ends.

[C#]

public event SpanningProcessEndedEventHandler SpanningProcessEnded;

See Also


_ProcessStarted_Event0

ZipEvents.ProcessStarted Event

Occurs when the process of zipping or unzipping starts.

[C#]

public event ProcessStartedEventHandler ProcessStarted;

See Also


_ProcessMessages_Event0

ZipEvents.ProcessMessages Event

Occurs during the processing of the file and it helps in the exchange of messages between the user and the zipping/unzipping process.

[C#]

public event ProcessMessagesEventHandler ProcessMessages;

Event Data

The event handler receives a ProcessMessagesInfo containing data related to the ProcessMessages event. The following ProcessMessagesInfo properties provide information specific to this event.

Property | Description
Abort | Sets or gets value indicating whether the process will be terminated. If Abort=true process will be terminated .

Remarks

Use this event to direct the process to continue or to terminate.

See Also


_ProcessEnded_Event0

ZipEvents.ProcessEnded Event

Occurs when the process of zipping or unzipping ends.

[C#]

public event ProcessEndedEventHandler ProcessEnded;

See Also


_SkippingFile_Event0

ZipEvents.SkippingFile Event

Occurs when the file is being skipped from processing.

[C#]

public event SkippingFileEventHandler SkippingFile;

Event Data

The event handler receives a SkippingFileInfo containing data related to the SkippingFile event. The following SkippingFileInfo properties provide information specific to this event.

Property | Description
FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
FilenameOnDisk | Gets string expression containing the path where the file would be stored
Size | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | Gets enumeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value of the expression representing the CRC value
LastModified | Gets value of the expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also


_RemovingFile_Event0

ZipEvents.RemovingFile Event

Occurs when the file is being removed from a zip archive.

[C#]

public event RemovingFileEventHandler RemovingFile;

Event Data

The event handler receives a RemovingFileInfo containing data related to the RemovingFile event. The following RemovingFileInfo properties provide information specific to this event.

Property | Description
FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
FilenameOnDisk | Gets string expression containing the path where the file would be stored
Size | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | Gets enumeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value of the expression representing the CRC value
LastModified | Gets value of the expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also


_TestingFile_event0

ZipEvents.TestingFile Event

Occurs when the zip archive is being tested.

[C#]

public event TestingFileEventHandler TestingFile;

Event Data

The event handler receives a TestingFileInfo containing data related to the TestingFile event. The following TestingFileInfo properties provide information specific to this event.

Property | Description
FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
Size | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value of the expression containing the file size before decompression (expressed in bytes)
Attributes | Gets enumeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value of the expression representing the CRC value
LastModified | Gets value of the expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also


Crc32

Crc32 Class

Provides functionality for calculating CRC32 checksums. CRC32 is industry standard checksum algorithm designed for verifying data Any public static integrity.

For a list of all members of this type, see Crc32 members

[C#]

public class Crc32

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll

See Also

Crc32 members


Constructors

Crc32 Constructors

Initializes a new instance of the Crc32 class.

Overload List

Default constructor for Crc32 class.

public Crc32();

Initializes a new instance of the Crc32 class and generates CRC32 checksum for the buffer.

[C#]public Crc32(byte buffer[], int offset, int count);

Initializes a new instance of the Crc32 class and generates CRC32 checksum for the buffer. Additionally, it takes custom starting checksum value.

[C#]public Crc32(byte buffer[], int offset, int count, uint nChecksum);

See Also

Crc32 class l Crc32 members


Crc32(byte buffer, int offset, int count)

Crc32 Constructor (byte [], int , int )

Initializes a new instance of the Crc32 class and generates CRC32 checksum for the buffer.

[C#]

public Crc32(

byte[] buffer,

int offset,

int count

);

Parameters

buffer

Buffer Crc32 checksum will be generated for.

offset

Offset from which we will start reading data from the byte array.

count

Number of bytes we will read from the byte array.

See Also

Crc32 Class | Crc32 Constructors

Example

byte[] pBuffer = new byte[1024];

FileStream pCrcReadFile = new FileStream(@"c:\default.file", FileMode.Open);

int nCont = pCrcReadFile.Read(pBuffer, 0, pBuffer.Length);

// generate crc checksum for the data

Crc32 pCrc = new Crc32(pBuffer, 0, nCont);

uint nChecksum = pCrc.Checksum;

pCrcReadFile.Close();


Crc32(byte buffer, int offset, int count, uint nChecksum)

Crc32 Constructor (byte [], int , int , uint )

Initializes a new instance of the Crc32 class and generates CRC32 checksum for the buffer.

[C#]

public Crc32(

byte[] buffer,

int offset,

int count,

uint nChecksum

);

Parameters

buffer

Buffer Crc32 checksum will be generated for.

offset

Offset from which we will start reading data from the byte array.

count

Number of bytes we will read from the byte array.

nChecksum

Custom starting checksum value.

Remarks

Custom checksum value can be used to continue generation of the previous checksum for the specific stream of data. By default, this value is standard ZIP starting checksum value.

See Also

Crc32 Class | Crc32 Constructors

Example

byte[] pBuffer = new byte[1024];

FileStream pCrcReadFile = new FileStream(@"c:\default.file", FileMode.Open);

int nCont = pCrcReadFile.Read(pBuffer, 0, pBuffer.Length);

// generate crc checksum for the data using custom starting checksum value

Crc32 pCrc = new Crc32(pBuffer, 0, nCont, 0xf3f4a3c3);

uint nChecksum = pCrc.Checksum;

pCrcReadFile.Close();


Checksum Property

Crc32.Checksum Property

Gets CRC32 checksum value.

[C#]

public uint Crc32.Checksum {get;}

Property Value

Gets CRC32 checksum value.

Remarks

CRC32 checksum this property gets is generated by one or by number of successive calls to the Update method or by one of the constructors.

See Also

Crc32 Class | Crc32 Constructors | Update Method

Example

byte[] pBuffer = new byte[1024];

FileStream pCrcReadFile = new FileStream(@"c:\default.file", FileMode.Open);

int nCont = pCrcReadFile.Read(pBuffer, 0, pBuffer.Length);

// generate crc checksum for the data

Crc32 pCrc = new Crc32(pBuffer, 0, nCont);

// checksum value generated by our previous action

uint nChecksum = pCrc.Checksum;

pCrcReadFile.Close();


Update Method

Crc32.Update Method

Generates CRC32 checksum for the buffer based on the previous CRC32 checksum.

[C#]

public uint Update(

byte buffer,

int offset,

int count

);

Parameters

buffer

Buffer Crc32 checksum will be generated for.

offset

Offset from which we will start reading data from the byte array.

count

Number of bytes we will read from the byte array.

Return Value

Returns CRC32 checksum value generated by this method.

Remarks

This method can be called any number of times. Each time this method is called, new checksum value is generated based on the previous one.

See Also

Crc32 Class | Crc32 Constructors | Checksum Property

Example

byte[] pBuffer = new byte[1024];

FileStream pCrcReadFile = new FileStream(@"c:\default.file", FileMode.Open);

Crc32 pCrc = new Crc32();

int nCount = 0;

// read data

while (0 != (nCount = pCrcReadFile.Read(pBuffer, 0, pBuffer.Length)))

{

// generate crc checksum for the data

pCrc.Update(pBuffer, 0, nCount);

}

pCrcReadFile.Close();


QuickCrc32 Method

Crc32.QuickCrc32 Method

Static method that generates CRC32 checksum for the buffer.

[C#]

public static uint QuickCrc32(

byte buffer,

int offset,

int count

);

Parameters

buffer

Buffer Crc32 checksum will be generated for.

offset

Offset from which we will start reading data from the byte array.

count

Number of bytes we will read from the byte array.

Return Value

Returns CRC32 checksum value generated by this method.

See Also

Crc32 Class | Crc32 Constructors

Example

byte[] pBuffer = new byte[1024];

FileStream pCrcReadFile = new FileStream(@"c:\default.file", FileMode.Open);

int nCont = pCrcReadFile.Read(pBuffer, 0, pBuffer.Length);

// generate crc32 checksum for the data

uint nChecksum = Crc32.QuickCrc32(pBuffer, 0, nCont);

pCrcReadFile.Close();


ZipException

ZipException Class

Polar Zip exceptions are thrown using this class. Additionally to string message explaining the error, exceptions also carry an error ID that can be used to distinguish between approximately 42 possible errors.

For a list of all members of this type, see ZipException members.

[C#]

public class ZipException : Exception

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll

See Also

ZipException members


Constructors

ZipException Constructors

Initializes a new instance of the ZipException class.

Overload List

Initializes a new instance of the ZipException class and sets error description string.

[C#]public ZipException(string strMessage) : base(strMessage);

Initializes a new instance of the ZipException class and sets error description string. Additionally, it sets error ID making it easier to distinguish specific errors.

[C#]public ZipException(string strMessage, int nErrorID) : base(strMessage);

See Also

ZipException class


ZipException(string strMessage)

ZipException Constructor (string )

Initializes a new instance of the ZipException class and receives string that contains description of the error.

[C#]

public Crc32(

string strMessage

);

Parameters

strMessage

String containing description of the error.

Remarks

Polar Zip error ID is set to 0 when ZipException is instantiated through this constructor.

See Also


ZipException(string strMessage, int nErrorID)

ZipException Constructor (string , int )

Initializes a new instance of the ZipException class. It receives string that contains description of the error and error ID.

[C#]

public ZipException(

string strMessage,

int nErrorID

);

Parameters

strMessage

String containing description of the error.

nErrorID

Unique error ID.

See Also


ErrorID Property

ZipException.ErrorID Property

Gets Polar Zip exception error ID.

[C#]

public int ZipException.ErrorID {get;}

Property Value

Gets Polar Zip exception error ID.

Error Description | ID
Unexpected end of zip file. | 202
Generic error in the zipfile format was detected. Processing may have completed successfully anyway. | 203
Unable to allocate memory for one or more buffers during program initialization. | 204
Severe error in the zipfile format was detected. Processing probably failed immediately. | 205
Entry too large to be split with zipsplit. | 206
Invalid comment format. | 207
TestArchive failed or out of memory. | 208
Encountered an error while using a temp. | 210
Read or seek error. | 211
Nothing to do. | 212
Missing or empty zip file. | 213
Error writing to a file. | 214
Unable to create a file to write to. | 215
Bad parameters. | 216
Could not open a specified file to read. | 217
ZIP file not specified or invalid. | 218
Source directory does not exist. | 219
Temporary path does not exist. | 220
ZIP file path does not exist. | 221
Unknown error. | 222
Generic error in the zipfile format was detected. | 224
Severe error in the zipfile format was detected. Processing probably failed immediately. | 225
Unable to allocate memory for one or more buffers during initialization. | 226
Unable to allocate memory or unable to obtain a try to read the decryption password (s). | 227
Unable to allocate memory during decompression to disk. | 228
Unable to allocate memory during in-memory decompression. | 229
Specified zipfiles were not found. | 231
Invalid options were specified. | 232
No matching files were found. | 233
The disk is (or was) full during extraction. | 234
The end of the ZIP archive was encountered prematurely. | 235
Testing or extraction of one or more files failed due to unsupported compression methods or decryption. | 237
No files were found due to bad decryption password (s). | 238
ZIP file not specified or it does not exist. | 239
Error while reading multi disk archive. | 240
Memory allocation error while reading multi disk archive. | 241
Unknown error while reading multi disk archive. | 242
At least two files are needed to create archive. | 247
Too many files specified to create archive from multi file archive. | 248
Could not create output file. | 249
Error reading input file. | 250
Error writing to output file. | 251

Remarks

CRC32 checksum this property gets is generated by one or by number of successive calls to the Update method or by one of the constructors.

See Also


ZipFileFilter

ZipFileFilter Class

ZipFileFilter contains file filtering information used by the ZipArchive class for archive/extract/delete operations.

For a list of all members of this type, see ZipFileFilter members .

[C#]

public class ZipFileFilter

Remarks

Additionally to various options, primary filters used for deciding which files will be added to the archive is done using files-to-include and files-to-exclude masks. These two masks can be used in a combination to exclude or add only specific files.

Mask

Description

"*"

This mask (multiplication symbol) will include all of the files from the source path.

Examples:

ZipFileFilter("*");

ZipFileFilter.FilesToIncludeMask = "*";

ZipFileFilter.FilesToIncludeMask = "temp\*";

Last example will include all of the files that are placed in "source path\temp\" folder, but not the ones that are in the source folder.

"*.*"

This mask (two multiplication symbols divided by a dot) will include all files that have an extension (e.g. "text.txt"). Files consisting only of a name (without extension) will not be included.

"file_name.*"

This mask will include only files that have the same name as specified regardless of their extension.

"*.extension"

This mask will include all files that have same extension regardless of their names.

"<char-char>"

Mask consisting of greater-than and lesser-than symbols separated with a minus character is used to determine the range of characters that can be at that specific spot.

Example:

ZipFileFilter.FilesToIncludeMask = "<a-c>.txt"

ZipFileFilter("chapter<0-4>.txt");

First mask includes only files that look like "a.txt", "b.txt" or "c.txt". Files like "d.txt" or "e.txt" will be ignored because their names contain characters that are outside of the given range.

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll

See Also

ZipFileFilter members


Constructors

ZipFileFilter Constructors

Initializes a new instance of the ZipFileFilter class.

Overload List

Default constructor for ZipFileFilter class.

[C#]public ZipFileFilter();

Initializes a new instance of the ZipFileFilter class and receives files-to-include mask.

[C#]public ZipFileFilter(string strFilesToIncludeMask);

See Also

ZipFileFilter class


ZipFileFilter(string strFilesToIncludeMask)

ZipFileFilter Constructor (string )

Initializes a new instance of the ZipFileFilter class and receives files-to-include mask. This mask is directly passed to the FilesToIncludeMask Property.

[C#]

public ZipFileFilter(

string strFilesToIncludeMask

);

Parameters

strFilesToIncludeMask

String that will be passed to the FilesToIncludeMask Property.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


_ZipFileFilter()

ZipFileFilter Constructor ()

Initializes a new instance of the ZipFileFilter class with no filter mask.

[C#]

public ZipFileFilter();

See Also


SkipFilesBeforeDate Property

ZipFileFilter.SkipFilesBeforeDate Property

Gets or sets the lower limitation date of the files that will be zipped. File date component will checked is the last modification date.

[C#]

public DateTime ZipFileFilter.SkipFilesBeforeDate {get; set;}

Property Value

Lower limitation date of the files that will be zipped. Default value is DateTime.MinValue.

Remarks

If you set both date-limitation properties, for example:

pZipFileFilter.SkipFilesBeforeDate = new DateTime(2002, 3, 1);

pZipFileFilter.SkipFilesAfterDate = new DateTime(2003, 3, 1);

only files last modified between the 2002-3-1 and the 2003-3-1 will be included.

See Also

ZipFileFilter Class | ZipFileFilter Constructors | SkipFilesAfterDate Property

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// set filter to skip files older than 2002-3-1 and newer

// than 2003-3-1

pZipFileFilter.SkipFilesBeforeDate = new DateTime(2002, 3, 1);

pZipFileFilter.SkipFilesAfterDate = new DateTime(2003, 3, 1);

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


SkipFilesAfterDate Property

ZipFileFilter.SkipFilesAfterDate Property

Gets or sets the upper limitation date of the files that will be zipped. File date component will checked is the last modification date.

[C#]

public DateTime ZipFileFilter.SkipFilesAfterDate {get; set;}

Property Value

Upper limitation date of the files that will be zipped. Default value is DateTime.MaxValue.

Remarks

If you set both date-limitation properties, for example:

pZipFileFilter.SkipFilesBeforeDate = new DateTime(2002, 3, 1);

pZipFileFilter.SkipFilesAfterDate = new DateTime(2003, 3, 1);

only files last modified between the 2002-3-1 and the 2003-3-1 will be included.

See Also

ZipFileFilter Class | ZipFileFilter Constructors | SkipFilesBeforeDate Property

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// set filter to skip files older than 2002-3-1 and newer

// than 2003-3-1

pZipFileFilter.SkipFilesBeforeDate = new DateTime(2002, 3, 1);

pZipFileFilter.SkipFilesAfterDate = new DateTime(2003, 3, 1);

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


SkipFilesIfOlder Property

ZipFileFilter.SkipFilesIfOlder Property

Setting this property to true will indicate that all already existing files will be overwritten only if they are older.

[C#]

public bool ZipFileFilter.SkipFilesIfOlder {get; set;}

Property Value

Default value is false.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// set filter to skip files if they are older

pZipFileFilter.SkipFilesIfOlder = true;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


SkipFilesSmallerThan Property

ZipFileFilter.SkipFilesSmallerThan Property

This property lets you limit the processing of files to only those that are larger than or equal to a specified file size.

[C#]

public int ZipFileFilter.SkipFilesSmallerThan {get; set;}

Property Value

Default value is Int32.MinValue.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// set filter to skip files smaller than 1mb and larger than 4mb

pZipFileFilter.SkipFilesSmallerThan = 1000 * 1024;

pZipFileFilter.SkipFilesLargerThan = 1000 * 1024 * 4;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


SkipFilesLargerThan Property

ZipFileFilter.SkipFilesLargerThan Property

This property lets you limit the processing of files to only those that are smaller than or equal to a specified file size.

[C#]

public int ZipFileFilter.SkipFilesLargerThan {get; set;}

Property Value

Default value is Int32.MaxValue.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// set filter to skip files smaller than 1mb and larger than 4mb

pZipFileFilter.SkipFilesSmallerThan = 1000 * 1024;

pZipFileFilter.SkipFilesLargerThan = 1000 * 1024 * 4;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


RequireFileAttributes Property

ZipFileFilter.RequireFileAttributes Property

This property lets you limit the processing of files to only those files that have specific file attributes.

[C#]

public ZipFileAttributes ZipFileFilter.RequireFileAttributes {get; set;}

Property Value

Default value is ZipFileAttributes.None.

See Also

ZipFileFilter Class | ZipFileFilter Constructors | ZipFileAttributes Enumeration

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// filter files based on their attributes

pZipFileFilter.RequireFileAttributes = ZipFileAttributes.None;

pZipFileFilter.ExcludeFileAttributes = ZipFileAttributes.System|ZipFileAttributes.Temporary;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


ExcludeFileAttributes Property

ZipFileFilter.ExcludeFileAttributes Property

This property lets you limit the processing of files to only those files that do not have specific file attributes.

[C#]

public ZipFileAttributes ZipFileFilter.ExcludeFileAttributes {get; set;}

Property Value

Default value is ZipFileAttributes.None.

See Also

ZipFileFilter Class | ZipFileFilter Constructors | ZipFileAttributes Enumeration

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// filter files based on their attributes

pZipFileFilter.RequireFileAttributes = ZipFileAttributes.None;

pZipFileFilter.ExcludeFileAttributes = ZipFileAttributes.System|ZipFileAttributes.Temporary;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


RecurseSubDirectories Properties

ZipFileFilter.RecurseSubDirectories Property

If set to true, all files that are located in the subdirectories of the source directory will be included into the archive.

[C#]

public bool ZipFileFilter.RecurseSubDirectories {get; set;}

Property Value

Default value is true.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// recurse through all of the subdirectories

pZipFileFilter.RecurseSubDirectories = true;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


FilesToExcludeMask Property

ZipFileFilter.FilesToExcludeMask Property

The FilesToExcludeMask property lets you exclude specific files or folders from the list of files to be processed and provided to the FilesToIncludeMask property.

[C#]

public string ZipFileFilter.FilesToExcludeMask {get; set;}

Property Value

Default value is an empty string ("").

Remarks

FilesToExcludeMask includes either file names or wildcards. Multiple wildcards or file names have to be separated by a pipe "|". If you want all files to be included, the FilesToExcludeMask property has to be set to " * ".

See Also

ZipFileFilter Class | ZipFileFilter Constructors | FilesToIncludeMask Property

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all files except those with zip, rar or arj extensions

pZipFileFilter.FilesToIncludeMask = "*";

pZipFileFilter.FilesToExcludeMask = "*.zip|*.rar|*.arj";

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


FilesToIncludeMask Property

ZipFileFilter.FilesToIncludeMask Property

The FilesToIncludeMask property is used to provide a list of files or folders to be processed by the Polar Zip control.

[C#]

public string ZipFileFilter.FilesToIncludeMask {get; set;}

Property Value

Default value is an empty string ("").

Remarks

FilesToIncludeMask includes either file names or wildcards. Multiple wildcards or file names have to be separated by a pipe "|". If you want all files to be included, the FilesToIncludeMask property has to be set to " * ".

See Also

ZipFileFilter Class | ZipFileFilter Constructors | FilesToExcludeMask Property

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all files except those with zip, rar or arj extensions

pZipFileFilter.FilesToIncludeMask = "*";

pZipFileFilter.FilesToExcludeMask = "*.zip|*.rar|*.arj";

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


IncludeHiddenFiles Property

ZipFileFilter.IncludeHiddenFiles Property

Defines whether hidden files will be added to the archive.

[C#]

public bool ZipFileFilter.IncludeHiddenFiles {get; set;}

Property Value

Default value is false.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include hidden files

pZipFileFilter.IncludeHiddenFiles = true;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


ExcludeFromCompressionMask Property

ZipFileFilter.ExcludeFromCompressionMask Property

Specifies suffixes of files that are not going to be compressed during compression process.

[C#]

public string ZipFileFilter.ExcludeFromCompressionMask {get; set;}

Property Value

Default value is an empty string ("").

Remarks

Multiple suffixes have to be divided by a colon or semi-colon. This property will be ignored if compression level is set to its maximum (9).

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all files

pZipFileFilter.FilesToIncludeMask = "*";

// do not copmpress these extensions (only add them to the archive)

pZipFileFilter.ExcludeFromCompressionMask = ".zip:.rar:.arj";

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


SkipExistingFiles Property

ZipFileFilter.SkipExistingFiles Property

This property allows you to only process files that do not already exist in the destination unzipping folder or when zipping, the destination zip file.

[C#]

public bool ZipFileFilter.SkipExistingFiles {get; set;}

Property Value

Default value is false.

See Also

ZipFileFilter Class | ZipFileFilter Constructors | SkipFilesThatDontExist Property

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all files

pZipFileFilter.FilesToIncludeMask = "*";

// skip all of the files that are already in the archive

pZipFileFilter.SkipExistingFiles = true;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


SkipFilesThatDontExist Property

ZipFileFilter.SkipFilesThatDontExist Property

This property allows you to only process files that already exist in the destination unzipping folder or when zipping, the destination zip file.

[C#]

public bool ZipFileFilter.SkipFilesThatDontExist {get; set;}

Property Value

Default value is false.

See Also

ZipFileFilter Class | ZipFileFilter Constructors | SkipExistingFiles Property

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all files

pZipFileFilter.FilesToIncludeMask = "*";

// skip all of the files that are not already in the archive

pZipFileFilter.SkipFilesThatDontExist = true;

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


AddFilesToExcludeMask Method

ZipFileFilter.AddFilesToExcludeMask Method

Appends mask to the FilesToExcludeMask property by placing '|' character between old and new mask (e.g. "*.doc | *.txt")

[C#]

public string AddFilesToExcludeMask(

string strMask

);

Parameters

strMask

Mask we will append to the FilesToExcludeMask property.

Return Value

Returns new mask.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all files but .zip

pZipFileFilter.AddFilesToIncludeMask("*");

pZipFileFilter.AddFilesToExcludeMask("*.zip");

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


AddFilesToIncludeMask Method

ZipFileFilter.AddFilesToIncludeMask Method

Appends mask to the FilesToIncludeMask property by placing '|' character between old and new mask (e.g. "*.doc | *.txt")

[C#]

public string AddFilesToIncludeMask(

string strMask

);

Parameters

strMask

Mask we will append to the FilesToIncludeMask property.

Return Value

Returns new mask.

See Also

ZipFileFilter Class | ZipFileFilter Constructors

Example

ZipFileFilter pZipFileFilter = new ZipFileFilter("*");

// include all .pdf and .doc files

pZipFileFilter.AddFilesToIncludeMask("*.pdf");

pZipFileFilter.AddFilesToIncludeMask("*.doc");

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive

pZipArchive.AddFiles(@"c:\temp", pZipFileFilter);


ZipArchive

ZipArchive Class

ZipArchive class represents zip archive. When class is instantiated it receives full path and name of the zip archive it will work with.

For a list of all members of this type, see ZipArchive members .

[C#]

public class ZipArchive : IDisposable

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll

See Also

ZipArchive members


Constructors

ZipArchive Constructors

Initializes a new instance of the ZipArchive class.

Overload List

Initializes a new instance of the ZipArchive class and sets zip archive name.

[C#]public ZipArchive(string strArchiveFile);

Initializes a new instance of the ZipArchive class and sets zip archive name.. Additionally, it takes an instance of the ZipEvents class.

[C#]public ZipArchive(string strArchiveFile, ZipEvents pEvents);

See Also

ZipArchive class


ZipArchive(string strArchiveFile)

ZipArchive Constructor (string )

Initializes a new instance of the ZipArchive class and sets full path to the archive.

[C#]

public ZipArchive(

string strArchiveFile

);

Parameters

strArchiveFile

Full path and name of the zip archive we will work with.

Remarks

Archive path and name cannot be changed after object is instantiated. In case archive does not physically exist at the specified location, it will be created during first attempt to add files to it.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


ZipArchive(string strArchiveFile, ZipEvents pEvents)

ZipArchive Constructor (string , ZipEvents )

Initializes a new instance of the ZipArchive class and sets full path to the archive. Additionally, it takes an instance of the ZipEvent class.

[C#]

public ZipArchive(

string strArchiveFile,

ZipEvents pEvents

);

Parameters

strArchiveFile

Full path and name of the zip archive we will work with.

pEvents

Instance of the ZipEvent object.

Remarks

Archive path and name cannot be changed after object is instantiated. In case archive does not physically exist at the specified location, it will be created during first attempt to add files to it.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create an instance of the event class

ZipEvents pZipEvents = new ZipEvents();

// add event handler

pZipEvents.FileStartedCompressing += new FileStartedCompressingEventHandler(OnFileStartedCompressing);

// add files to the archive (creates archive in the process)

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip", pZipEvents);

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

void OnFileStartedCompressing(object pSender, FileStartedCompressingInfo pArgs)

{

MessageBox.Show(pArgs.Filename);

}


ArchiveFile Property

ZipArchive.ArchiveFile Property

Gets full path to the zip archive.

[C#]

public string ZipArchive.ArchiveFile {get;}

Property Value

String containing full path to the zip archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

// get path

MessageBox.Show(pZipArchive.ArchiveFile);


CompressionLevel Property

ZipArchive.CompressionLevel Property

Gets or sets the level of data compression. Compression levels range from 0 to 9.

[C#]

public int ZipArchive.CompressionLevel {get; set;}

Property Value

Default value of this property is 6.

Remarks

If compression level is set to zero, there will be no compression. Property ZipFileFilter.ExcludeFromCompressionMask has no effect if compression level is set to maximum (9).

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// increase compression level

pZipArchive.CompressionLevel = 9;

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


OverwriteExistingFiles Property

ZipArchive.OverwriteExistingFiles Property

Gets or sets whether existing files will be overwritten during decompression.

[C#]

public bool ZipArchive.OverwriteExistingFiles {get; set;}

Property Value

Default value of this property is true.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// do not overwrite existing files

pZipArchive.OverwriteExistingFiles = false;

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


Password Property

ZipArchive.Password Property

Sets the password that will be used for encryption/decryption during zipping or unzipping. Setting this property to an empty string ("") will disable encryption.

[C#]

public string ZipArchive.Password {set;}

Property Value

Default value of this property is an empty string ("").

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// set password

pZipArchive.Password = "polar";

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

// disable password

pZipArchive.Password = "";


StorePaths Property

ZipArchive.StorePaths Property

Gets or sets whether the path of the processed files will be included into the archive. If set to false, only file names will be stored.

[C#]

public bool ZipArchive.StorePaths {get; set;}

Property Value

Default value of this property is true.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// do not store file paths

pZipArchive.StorePaths = false;

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


TemporaryPath Property

ZipArchive.TemporaryPath Property

Temporary file will be created during compression process. If this parameter is an empty string, temporary system folder will be used to accommodate this.

[C#]

public string ZipArchive.TemporaryPath {get; set;}

Property Value

Default value of this property is an empty string ("").

Remarks

Path passed to this property should not contain file name, only temporary folder path (e.g. "c:\temp\").

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive object

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

// set temporary path

pZipArchive.TemporaryPath = @"c:\temp_path\";

// add all files to the archive (creates archive in the process)

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


_QuickZip_OverLoad

ZipArchive.QuickZip Method

Static method for quick and easy zipping.

Overload List

Static method for quick and easy zipping.

[C#]public static void QuickZip(string strArchiveFile, string strSourceDirectory, string strFilesToIncludeMask)

Static method for quick and easy zipping. Takes the Zip file encryption password.

[C#]public static void QuickZip(string strArchiveFile, string strSourceDirectory, string strFilesToIncludeMask, string strPassword)

See Also

ZipArchive class


QuickZip(string strArchiveFile, string strSourceDirectory, string strFilesToIncludeMask)

ZipArchive.QuickZip Method

Static method for quick and easy zipping.

[C#]

public static void QuickZip(

string strArchiveFile,

string strSourceDirectory,

string strFilesToIncludeMask

);

Parameters

strArchiveFile

Archive we will add our files to.

strSourceDirectory

Directory we will use as starting point for the filter.

strFilesToIncludeMask

Filter mask used to distinguish what files will be added to the archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// quick zip

ZipArchive.QuickZip(@"c:\archive.zip", @"c:\temp", "*");


QuickZip(string strArchiveFile, string strSourceDirectory, string strFilesToIncludeMask, string strPassword)

ZipArchive.QuickZip Method

Static method for quick and easy zipping.

[C#]

public static void QuickZip(

string strArchiveFile,

string strSourceDirectory,

string strFilesToIncludeMask,

string strPassword

);

Parameters

strArchiveFile

Archive we will add our files to.

strSourceDirectory

Directory we will use as starting point for the filter.

strFilesToIncludeMask

Filter mask used to distinguish what files will be added to the archive.

strPassword

Zip file encryption password.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// quick zip

ZipArchive.QuickZip(@"c:\archive.zip", @"c:\temp", "*", "polar");


_QuickUnZip_OverLoad

ZipArchive.QuickUnZip Method

Static method for quick and easy unzipping.

Overload List

Static method for quick and easy unzipping.

[C#]public static void QuickUnZip(string strArchiveFile, string strSourceDirectory, string strFilesToIncludeMask)

Static method for quick and easy zipping. Takes the Zip file encryption password.

[C#]public static void QuickUnZip(string strArchiveFile, string strSourceDirectory, string strFilesToIncludeMask, string strPassword)

See Also

ZipArchive class


QuickUnZip(string strArchiveFile, string strExtractToDirectory, string strFilesToIncludeMask)

ZipArchive.QuickUnZip Method

Static method for quick and easy unzipping.

[C#]

public static void QuickUnZip(

string strArchiveFile,

string strExtractToDirectory,

string strFilesToIncludeMask

);

Parameters

strArchiveFile

Archive we will extract our files from.

strExtractToDirectory

Folder we will extract our files to.

strFilesToIncludeMask

Filter mask used to distinguish what files will be extracted from the archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// quick unzip

ZipArchive.QuickUnZip(@"c:\archive.zip", @"c:\temp", "*");


QuickUnZip(string strArchiveFile, string strExtractToDirectory, string strFilesToIncludeMask, string strPassword)

ZipArchive.QuickUnZip Method

Static method for quick and easy unzipping.

[C#]

public static void QuickUnZip(

string strArchiveFile,

string strExtractToDirectory,

string strFilesToIncludeMask,

string strPassword

);

Parameters

strArchiveFile

Archive we will extract our files from.

strExtractToDirectory

Folder we will extract our files to.

strFilesToIncludeMask

Filter mask used to distinguish what files will be extracted from the archive.

strPassword

Zip file encryption password.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// quick unzip

ZipArchive.QuickUnZip(@"c:\archive.zip", @"c:\temp", "*", "polar");


_AddFiles_OverLoad

ZipArchive.AddFiles Method

Add new files to the archive. If archive does not exist, it will be created.

Overload List

Add new files to the archive. If archive does not exist, it will be created.

[C#]public void AddFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter)

Add new files to the archive. If archive does not exist, it will be created. Takes the maximum size of the spanned files.

[C#]public void AddFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter, int nMaximumSize)

See Also

ZipArchive class


AddFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter)

ZipArchive.AddFiles Method

Add new files to the archive. If archive does not exist, it will be created.

[C#]

public void AddFiles(

string strSourceDirectory,

ZipFileFilter pZipFileFilter

);

Parameters

strSourceDirectory

Folder we will use as a starting point for the filter.

pZipFileFilter

Filter used to distinguish what files will be added to the archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// add files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));


AddFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter, int nMaximumSize)

ZipArchive.AddFiles Method

Add new files to the archive. If archive does not exist, it will be created.

[C#]

public void AddFiles(

string strSourceDirectory,

ZipFileFilter pZipFileFilter,

int nMaximumSize

);

Parameters

strSourceDirectory

Folder we will use as a starting point for the filter.

pZipFileFilter

Filter used to distinguish what files will be added to the archive.

nMaximumSize

Maximum size of the spanned files.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// add files to the archive. archive will be spanned into 1mb sized chunks

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"), 1000 * 1024);


_MoveFiles_OverLoad

ZipArchive.MoveFiles Method

Moves new files to the archive. If archive does not exist, it will be created.

Overload List

Moves new files to the archive. If archive does not exist, it will be created.

[C#]public void MoveFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter)

Moves new files to the archive. If archive does not exist, it will be created. Takes the maximum size of the spanned files.

[C#]public void MoveFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter, int nMaximumSize)

See Also

ZipArchive class


MoveFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter)

ZipArchive.MoveFiles Method

Add new files to the archive. If archive does not exist, it will be created.

[C#]

public void MoveFiles(

string strSourceDirectory,

ZipFileFilter pZipFileFilter

);

Parameters

strSourceDirectory

Folder we will use as a starting point for the filter.

pZipFileFilter

Filter used to distinguish what files will be moved to the archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// move files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.MoveFiles(@"c:\temp", new ZipFileFilter("*"));


MoveFiles(string strSourceDirectory, ZipFileFilter pZipFileFilter, int nMaximumSize)

ZipArchive.MoveFiles Method

Add new files to the archive. If archive does not exist, it will be created.

[C#]

public void MoveFiles(

string strSourceDirectory,

ZipFileFilter pZipFileFilter,

int nMaximumSize

);

Parameters

strSourceDirectory

Folder we will use as a starting point for the filter.

pZipFileFilter

Filter used to distinguish what files will be moved to the archive.

nMaximumSize

Maximum size of the spanned files.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// move files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.MoveFiles(@"c:\temp", new ZipFileFilter("*"), , 1000 * 1024);


SetArchiveComment Method

ZipArchive.SetArchiveComment Method

Use this method to set the zip archive comment.

[C#]

public void SetArchiveComment(

string strArchiveComment

);

Parameters

strArchiveComment

New comment for the zip archive.

Remarks

This method will fail if archive does not already exist. To set comments for individual files, use FileStartedCompressing event.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// add files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

// set archive comment

pZipArchive.SetArchiveComment("comment");


GetArchiveComment Method

ZipArchive.GetArchiveComment Method

Use this method to retrieve the zip archive comment.

[C#]

public string GetArchiveComment();

Return Value

Returns string containing archives comment.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// add files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

// display archive comment

MessageBox.Show(pZipArchive.GetArchiveComment());


ArchiveExists Method

ZipArchive.ArchiveExists Method

Use this method to check if archive file exists at the path passed through the class constructor.

[C#]

public bool ArchiveExists();

Return Value

Returns true if archive physically exists.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// create archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

// check if it was created

if(pZipArchive.ArchiveExists());

{

MessageBox.Show("Archive exists!");

}


SetArchiveTimeStamp Method

ZipArchive.SetArchiveTimeStamp Method

Use this method if you want to set the date and time of the specified archive to the last modification date and time of its newest zip item.

[C#]

public void SetArchiveTimeStamp();

Remarks

After creating the archive, you can assign the date and time of the latest (most recent) item within the zip file to zip file itself. Before using this method, the date and time of the zip file will be set to the moment it was created (or last modified).

See Also

ZipArchive Class | ZipArchive Constructors

Example

// add files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

// update archive timestamp

pZipArchive.SetArchiveTimeStamp();


ExtractFiles Method

ZipArchive.ExtractFiles Method

Extracts files from the archive.

[C#]

public void ExtractFiles(

string strExtractToDirectory,

ZipFileFilter pZipFileFilter

);

Parameters

strExtractToDirectory

Folder we will extract our files to.

pZipFileFilter

Filter used to distinguish what files will be extracted from the archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// extract files from the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.ExtractFiles(@"c:\temp", new ZipFileFilter("*"));


DeleteFiles Methods

ZipArchive.DeleteFiles Method

Deletes files from the archive.

[C#]

public void DeleteFiles(

ZipFileFilter pZipFileFilter

);

Parameters

pZipFileFilter

Filter used to distinguish what files will be deleted from the archive.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// delete files from the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.DeleteFiles(new ZipFileFilter("*.zip"));


ListFiles Method

ZipArchive.ListFiles Method

Lists files that are stored inside the archive through the FileInfoEventHandler.

[C#]

public void ListFiles(

ZipFileFilter pZipFileFilter

);

Parameters

pZipFileFilter

Filter used to distinguish what files will be listed.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// instantiate ZipEvent class

ZipEvents pZipEvents = new ZipEvents();

pZipEvents.FileInfo += new FileInfoEventHandler(OnFileInfo);

// list files in the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip", pZipEvents);

pZipArchive.ListFiles (new ZipFileFilter("*.zip"));

void OnFileInfo(object pSender, FileInfoInfo pArgs)

{

MessageBox.Show(pArgs.Filename);

}


TestArchive Method

ZipArchive.TestArchive Method

Use this method if you want to perform a quick check of the validity of the zip archive.

[C#]

public bool TestArchive(

bool bThrowException

);

Parameters

bThrowException

Indicates whether exception with error ID and description will be thrown in case error is found within archive.

Return Value

Returns boolean value indicating if test was successful.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// test archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.TestArchive(true);


FixArchive Method

ZipArchive.FixArchive Method

This method will attempt to fix corrupted zip archive.

[C#]

public bool FixArchive(

bool bHarder,

bool bThrowException

);

Parameters

bHarder

Indicates whether we will attempt to fix a damaged zip file by trying to determine the size of each item in the zip archive.

bThrowException

Indicates whether exception with error ID and description will be thrown in case we failed to fix the archive.

Return Value

Returns boolean value indicating if archive was successfully repaired.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// repair the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.FixArchive(true, true);


SpanArchive Method

ZipArchive.SpanArchive Method

Spans existing archive to multiple smaller files.

[C#]

public void SpanArchive(

string strSpanName,

int nMaximumSize

);

Parameters

strSpanName

Name of new archive/s. Each new spanned file will have its index number appended at the end.

nMaximumSize

Maximum size of the spanned files.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// span the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.SpanArchive(@"c:\spanned_archive.zip", 1000 * 1024);


CombineSpannedArchive Method

ZipArchive.CombineSpannedArchive Method

Combines spanned archive into single file archive.

[C#]

public void CombineSpannedArchive(

string strSpanName,

);

Parameters

strSpanName

Name of the spanned archive. Combining archive starts from the last spanned file (one with the highest index number).

See Also

ZipArchive Class | ZipArchive Constructors

Example

// combine spanned archive

ZipArchive pZipArchive = new ZipArchive(@"c:\combined_archive.zip");

pZipArchive.CombineSpannedArchive(@"c:\spanned_archive.zip");


QuickSpanArchive Method

ZipArchive.QuickSpanArchive Method

Static method for spanning existing archive to multiple smaller files.

[C#]

public static void QuickSpanArchive(

string strArchiveFile,

string strSpanName,

int nMaximumSize

);

Parameters

strArchiveFile

Name of the new archive we will span.

strSpanName

Name of new archive/s. Each new spanned file will have its index number appended at the end.

nMaximumSize

Maximum size of the spanned files.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// quick span

ZipArchive.QuickSpanArchive(@"c:\archive.zip", @"c:\spanned_archive.zip", 1000 * 1024);


QuickCombineSpannedArchive Method

ZipArchive.QuickCombineSpannedArchive Method

Static method for combining spanned archive into single file archive.

[C#]

public static void QuickCombineSpannedArchive(

string strSpanName,

string strArchiveFile

);

Parameters

strSpanName

Name of the spanned archive. Combining archive starts from the last spanned file (one with the highest index number)

strArchiveFile

Name of the new archive we will combine spanned archive to.

See Also

ZipArchive Class | ZipArchive Constructors

Example

// quick unspan

ZipArchive.QuickCombineSpannedArchive(@"c:\spanned_archive.zip", @"c:\combined_archive.zip");


CompressionStream

CompressionStream Class

Provides functionality for calculating compressing/decompressing any type of the stream. Reading from the stream will decompress data from it while writing to the stream will compress data.

For a list of all members of this type, see CompressionStream members

[C#]

public class CompressionStream : Stream

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll

See Also

CompressionStream members


Constructors

CompressionStream Constructors

Initializes a new instance of the CompressionStream class.

Overload List

Initializes a new instance of the CompressionStream class and receives the stream compression/decompression will be performed on.

[C#]public CompressionStream(Stream pStream);

See Also

CompressionStream class


CompressionStream(Stream pStream)

CompressionStream Constructor (Stream )

Initializes a new instance of the CompressionStream class and receives the stream compression/decompression will be performed on.

[C#]

public CompressionStream(

Stream pStream

);

Parameters

pStream

Stream containing compressed or uncompressed data we will work on.

See Also

CompressionStream Class | CompressionStream Constructors

Example

FileStream pFileRead = new FileStream(@"c:\uncompressed.file", FileMode.Open);

FileStream pFileWrite = new FileStream(@"c:\compressed.file", FileMode.Create);

// create compression stream arround write stream

CompressionStream pCompression = new CompressionStream(pFileWrite);

byte[] byteArray = new byte[2048];

int nCount = 0;

// read stream and compress it.

while (0 != (nCount = pFileRead.Read(byteArray, 0, 1024)))

{

// compress data

pCompression.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();


CanRead Property

CompressionStream.CanRead Property

Gets whether the current stream supports reading.

[C#]

public override bool CompressionStream.CanRead {get;}

Property Value

Boolean value indicating if stream can be read from.

Remarks

Compression stream can be only read from or written to.

See Also

CompressionStream Class | CompressionStream Constructors

Example

FileStream pFileRead = new FileStream(@"c:\uncompressed.file", FileMode.Open);

FileStream pFileWrite = new FileStream(@"c:\compressed.file", FileMode.Create);

// create compression stream arround write stream

CompressionStream pCompression = new CompressionStream(pFileWrite);

byte[] byteArray = new byte[2048];

int nCount = 0;

// read stream and compress it.

while (0 != (nCount = pFileRead.Read(byteArray, 0, 1024)))

{

// compress data

pCompression.Write(byteArray, 0, nCount);

if(!pCompression.CanRead)

{

// we should not be able to read from this stream as we

// have already started writing to it

MessageBox.Show("Cannot read from this stream!");

}

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();


CanWrite Property

CompressionStream.CanWrite Property

Gets whether the current stream supports writing.

[C#]

public override bool CompressionStream.CanWrite {get;}

Property Value

Boolean value indicating if stream can be written to.

Remarks

Compression stream can be only read from or written to.

See Also

CompressionStream Class | CompressionStream Constructors

Example

FileStream pFileRead = new FileStream(@"c:\uncompressed.file", FileMode.Open);

FileStream pFileWrite = new FileStream(@"c:\compressed.file", FileMode.Create);

// create compression stream arround write stream

CompressionStream pCompression = new CompressionStream(pFileWrite);

byte[] byteArray = new byte[2048];

int nCount = 0;

// read stream and compress it.

while (0 != (nCount = pFileRead.Read(byteArray, 0, 1024)))

{

// compress data

pCompression.Write(byteArray, 0, nCount);

if(!pCompression.CanWrite)

{

// we should be able to write to this stream as we

// have started reading from it

MessageBox.Show("Cannot read from this stream!");

}

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();


CanSeek Property

CompressionStream.CanSeek Property

Gets whether the current stream supports seeking.

[C#]

public override bool CompressionStream.CanSeek {get;}

Property Value

Boolean value indicating if we can seek through the encapsulated stream.

See Also


Length Property

CompressionStream.Length Property

Gets length in bytes of the encapsulated stream.

[C#]

public override long CompressionStream.Length {get;}

Property Value

Returns length of the encapsulated stream.

See Also


Position Property

CompressionStream.Position Property

Get or set position within the current stream. Changing this property manually might result in unwanted side effects.

[C#]

public override long CompressionStream.Position {get; set;}

Property Value

Returns current position of the encapsulated stream.

See Also


CompressionLevel Property

CompressionStream.CompressionLevel Property

Gets or sets the level of data compression. Compression levels range from 0 to 9.

[C#]

public int CompressionStream.CompressionLevel {get; set;}

Property Value

Default value of this property is 6.

Remarks

If compression level is set to zero, there will be no compression.

See Also


Flush Method

CompressionStream.Flush Method

Calls inner stream's Flush method (Stream passed through the constructor).

[C#]

public override void Flush();

See Also


Read Method

CompressionStream.Read Method

Decompresses sequence of bytes from the stream and stores it into byte array.

[C#]

public override int Read(

byte[] buffer,

int offset,

int count

);

Parameters

buffer

Byte array where we will store decompressed data.

offset

Offset from which we will start writing data to the byte array.

count

Number of bytes we will write to the byte array.

Return Value

Returns number of bytes read from the stream.

Remarks

Once stream is started to be read from, it cannot be written to.

See Also

CompressionStream Class | CompressionStream Constructors

Example

// instantiate crc32 classes we will use to confirm file integrity

Crc32 pWriteCrc32 = new Crc32();

Crc32 pReadCrc32 = new Crc32();

// initialise read/write streams for compression

FileStream pFileRead = new FileStream(@"c:\uncompressed.file", FileMode.Open);

FileStream pFileWrite = new FileStream(@"c:\compressed.file", FileMode.Create);

// encapsulate the stream we will compress to

CompressionStream pCompression = new CompressionStream(pFileWrite);

byte[] byteArray = new byte[2048];

int nCount = 0;

// compress

while (0 != (nCount = pFileRead.Read(byteArray, 0, 1024)))

{

pWriteCrc32.Update(byteArray, 0, nCount);

pCompression.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();

// initialise read/write streams for decompression

pFileRead = new FileStream(@"c:\compressed.file", FileMode.Open);

pFileWrite = new FileStream(@"c:\uncompressed.file2", FileMode.Create);

// encapsulate the stream we will decompress from

pCompression = new CompressionStream(pFileRead);

nCount = 0;

// decompress

while (0 != (nCount = pCompression.Read(byteArray, 0, 1024)))

{

pReadCrc32.Update(byteArray, 0, nCount);

pFileWrite.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();

// confirm data is identical

if(pWriteCrc32.Checksum != pReadCrc32.Checksum)

{

throw new Exception("crc32");

}


Write Method

CompressionStream.Write Method

Compresses sequence of bytes and stores them into the stream.

[C#]

public override int Write(

byte[] buffer,

int offset,

int count

);

Parameters

buffer

Data we will compress.

offset

Offset from which we will start reading data.

count

Number of bytes that will be compressed.

Return Value

Returns number of bytes written to the stream.

Remarks

Once stream is started to be written to, it cannot be read from.

See Also

CompressionStream Class | CompressionStream Constructors

Example

// instantiate crc32 classes we will use to confirm file integrity

Crc32 pWriteCrc32 = new Crc32();

Crc32 pReadCrc32 = new Crc32();

// initialise read/write streams for compression

FileStream pFileRead = new FileStream(@"c:\uncompressed.file", FileMode.Open);

FileStream pFileWrite = new FileStream(@"c:\compressed.file", FileMode.Create);

// encapsulate the stream we will compress to

CompressionStream pCompression = new CompressionStream(pFileWrite);

byte[] byteArray = new byte[2048];

int nCount = 0;

// compress

while (0 != (nCount = pFileRead.Read(byteArray, 0, 1024)))

{

pWriteCrc32.Update(byteArray, 0, nCount);

pCompression.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();

// initialise read/write streams for decompression

pFileRead = new FileStream(@"c:\compressed.file", FileMode.Open);

pFileWrite = new FileStream(@"c:\uncompressed.file2", FileMode.Create);

// encapsulate the stream we will decompress from

pCompression = new CompressionStream(pFileRead);

nCount = 0;

// decompress

while (0 != (nCount = pCompression.Read(byteArray, 0, 1024)))

{

pReadCrc32.Update(byteArray, 0, nCount);

pFileWrite.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();

// confirm data is identical

if(pWriteCrc32.Checksum != pReadCrc32.Checksum)

{

throw new Exception("crc32");

}


Seek Method

CompressionStream.Seek Method

Sets the position within the current stream. Changing this property manually might result in unwanted side effects.

[C#]

public override long Seek(

long offset,

SeekOrigin origin

);

Parameters

offset

Byte offset relative to origin.

origin

SeekOrigin enumeration indicating the reference point used to obtain the new position.

Return Value

Returns the new position within the current stream.

See Also


SetLength Method

CompressionStream.SetLength Method

Sets the length of the current stream. Trying to call this method will result in System.NotSupportedException exception.

[C#]

public override void SetLength(

long value

);

Parameters

value

New stream length.

See Also


_HowToCreateZipFile

How to

Create Zip File

Polar Zip starts zipping when you call the AddFiles method, but before that, you must create ZipArchive object with the name of your zip file. If zip file doesn’t exist it will be created . If it does exist newly added files will be added to the existing ones.

Example

// add files to the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"));

As you can see AddFiles method takes the name of the source directory and ZipFileFilter object to specify what files to include ( which extension, attributes, size etc.)

There is quicker way by using static QuickZip method. You have to specify the name of the zip file , the source directory and string with names of the files to include.

Example

//quick zip

ZipArchive.QuickZip(@"c:\archive.zip", @"c:\temp", "*");

See Also


_HowToUnzipExistingArchive

How to

Unzip An Existing Archive

Polar Zip starts unzipping when you call the ExtractFiles method . First you have to create ZipArchive object (if it doesn’t already exist) with the name of your zip file. Then you call ExtractFiles method specifying the destination directory and ZipFileFilter object which determines what files to extract ( with particular file attributes, size, date etc.)

Example

// extract files from the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.ExtractFiles(@"c:\temp", new ZipFileFilter("*"));

There is quicker way by using static QuickUnZip method. You have to specify the name of the zip file , the destination directory and string with names of the files to extract.

Example

//quick unzip

ZipArchive.QuickUnZip(@"c:\archive.zip", @"c:\temp", "*");

See Also


_HowToListFilesInArchive

How to

List Files In Archive

To list the contents of the zip file, follow these instructions:

1. Instantiate ZipEvent class and submit your FileInfoEventHandler.

2. Call the ListFiles method. This method will 'read' the zip file and at each file, the FileInfo event will be triggered.

3. You must catch this event and display or save the needed information.

Example

// instantiate ZipEvent class

ZipEvents pZipEvents = new ZipEvents();

pZipEvents.FileInfo += new FileInfoEventHandler(OnFileInfo);

// list files in the archive

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip", pZipEvents);

pZipArchive.ListFiles (new ZipFileFilter("*.zip"));

// handle FileInfo event

void OnFileInfo(object pSender, FileInfoInfo pArgs)

{

MessageBox.Show(pArgs.Filename);

}

See Also


_HowToCreateMultiArchive

How to

Create Multi Archive Zip Files

With PolarZip you can create multi-archive zip files ( instead of a single file you split it into more files) either on removable (e.g. floppy disk) or non-removable (e.g. hard disk ) drive.

Example

// multi archive on hard disk

// each file is maximum 100 kb

// e.g. if archive.zip is 340 kb then it will be split in 4 files (100 ,100,100 ,40 kb )

// with names arhive001.zip,archive002.zip, archive003.zip, archive004.zip

ZipArchive pZipArchive = new ZipArchive(@"c:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"), 100 * 1024);

Example

// multi archive on floppies

// each file is maximum 100 kb

ZipArchive pZipArchive = new ZipArchive(@"a:\archive.zip");

pZipArchive.AddFiles(@"c:\temp", new ZipFileFilter("*"), 100 * 1024);

See Also


_HowToCompress/UncompressStreams

How to

Compress And Uncompress Streams

With PolarZip you can perform compressing and decompressing streams and buffers directly in memory .

You use CompressionStream class ,and its methods Write and Read which compress and uncompress automatically while writing and reading.

Example

// instantiate crc32 classes we will use to confirm file integrity

Crc32 pWriteCrc32 = new Crc32();

Crc32 pReadCrc32 = new Crc32();

// initialise read/write streams for compression

FileStream pFileRead = new FileStream(@"c:\uncompressed.file", FileMode.Open);

FileStream pFileWrite = new FileStream(@"c:\compressed.file", FileMode.Create);

// encapsulate the stream we will compress to

CompressionStream pCompression = new CompressionStream(pFileWrite);

byte[] byteArray = new byte[2048];

int nCount = 0;

// compress

while (0 != (nCount = pFileRead.Read(byteArray, 0, 1024)))

{

pWriteCrc32.Update(byteArray, 0, nCount);

pCompression.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();

// initialise read/write streams for decompression

pFileRead = new FileStream(@"c:\compressed.file", FileMode.Open);

pFileWrite = new FileStream(@"c:\uncompressed.file2", FileMode.Create);

// encapsulate the stream we will decompress from

pCompression = new CompressionStream(pFileRead);

nCount = 0;

// decompress

while (0 != (nCount = pCompression.Read(byteArray, 0, 1024)))

{

pReadCrc32.Update(byteArray, 0, nCount);

pFileWrite.Write(byteArray, 0, nCount);

}

pFileRead.Close();

pFileWrite.Close();

pCompression.Close();

// confirm data is identical

if(pWriteCrc32.Checksum != pReadCrc32.Checksum)

{

throw new Exception("crc32");

}

See Also


_faqGeneral

General FAQ

Do you offer technical support for trial version software?

Yes, we do. Our support team is ready to help anyone but we must remind you that our registered customers are always served first.

How can I purchase Polar ZIP Component?

The easiest way to purchase it is to place your order online.

How do you deliver your products?

Polar software products are only available via ESD (Electronic Software Download).

Is the number of licenses referring to developers or to end users?

The number of licenses refers to the number of developers' machines and one software license is required per developer's machine. Re-distribution with your application is royalty free.

What is your upgrade policy?

Minor upgrades that include bug fixes and minor improvements are free.

Major upgrades carry an upgrade fee. Also we always give a 30-day grace period (any upgrade, major or minor, within 30 days of the purchase is free).


_faqTehnical

Technical FAQ

What are the limitations of the trial version?

The trial version of Polar ZIP for .NET is completely functional and expires after 30 days. This means that you get to experience all the functions present in our release version for 30 days. After trial period expires, component will throw an exception when you attempt to call it.

How much time do I need to spend between installing Polar Zip for .NET and developing successful compression-intensive applications? I mean, how long will it take me to learn to use it? And what about compatibility?

Polar Zip for .NET is simple: being a software developer, you know your time is precious. Now, you can devote it to what you do best - your own projects. When you need compression, just point the task to Polar Zip for .NET and consider it done - all actions (compression, decompression, archive splitting and combining) can be preformed with a single line of code. And you have archives 100% compatible with the latest zip file format, which can be used by any ZIP format supporting software in the world, plus you can use any ZIP archive you might come across.

Polar Zip for .NET is advertised to be both simple & advanced at the same time - just how is this accomplished?

If easy of use is what you're after, all the important tasks are achieved through the static interface quick methods (i.e. Polar.Zip.QuickZip("archive.zip", "c:\data", "*") ). Polar Zip for .NET's advanatges become evident when you use the object - oriented approach in more advanced compression operations. Any option you might come across is probably (if it's been used in the last 15 years by a number of people, that is) already included, as you can see by yourself examining the feature list.

Why does Polar Zip for .NET use the AES encryption? And doesn't that make it incompatible with the "plain vanilla" ZIP standard?

The AES is the Rijndael algorithm, the winner of a three-year competition involving some of the world's leading cryptographers. It is used by U.S. Government organizations to protect sensitive (unclassified) information. It is also widely used on a voluntary basis by organizations, institutions, and individuals outside of the U.S. Government and outside of the United States as well. The AES is a block cipher that uses long keys (128-, 192-, 256-bit) for data encryption. It was developed by Belgian cryptographers Joan Daemen and Vincent Rijmen. Both are highly regarded experts within the international cryptographic community.

By incorporating the AES into Polar ZIP, we have increased Polar ZIP's performance and usability. AES encryption in Polar ZIP is an option available during the creation of self-extracting (executable) archives. Therefore, while it now supports the powerful AES encryption, Polar ZIP remains 100% compatible with the latest PKZIP standard which does not include such encryption.

What compression ratios does Polar Zip for .NET offer? Is there a set ratio or is it adjustable?

There is no fixed compression ratio in PolarZIP for .NET - the actual ratio depends on the type of the data being compressed. Due to the algorithms used, files with a repetitive data structure (i.e. images with large black areas) result in smaller archive files than those of a more random nature. If you want to adjust the intensity of compression, Polar Zip for .NET allows you to choose from ten different compression level - from simply storing files to using complex methods resulting in the highest compression ratios.


_CompressionStream_Members

CompressionStream Members

Public Constructor

CompressionStream

constructor

Initializes a new instance of the CompressionStream class and receives the stream compression/decompression will be performed on.

Public Properties

CanRead | Gets whether the current stream supports reading.
CanSeek | Gets whether the current stream supports seeking.
CanWrite | Gets whether the current stream supports writing.
CompressionLevel | Gets or sets the level of data compression. Compression levels range from 0 to 9.
Length | Gets length in bytes of the encapsulated stream.
Position | Gets or sets position within the current stream. Changing this property manually might result in unwanted side effects.

Public Methods

Flush | Calls inner stream's Flush method (Stream passed through the constructor).
Read | Decompresses sequence of bytes from the stream and stores it into byte array.
Write | Compresses sequence of bytes and stores them into the stream.
SetLength | Sets the length of the current stream. Trying to call this method will result in System.NotSupportedException exception.
Seek | Sets the position within the current stream. Changing this property manually might result in unwanted side effects.

See Also

CompressionStream class


_Crc32_Members

Crc32 Members

Public Constructors

Crc32 Constructor

Initializes a new instance of the Crc32 class.

Public Properties

Checksum

Gets CRC32 checksum value.

Public Methods

QuickCrc32 | Static method that generates CRC32 checksum for the buffer.
Update | Generates CRC32 checksum for the buffer based on the previous CRC32 checksum.

See Also

Crc32 class


_ZipArchive_members

ZipArchive members

Public Constructors

ZipArchive Constructor

Initializes a new instance of the ZipArchive class.

Public Properties

ArchiveFile | Gets full path to the zip archive.
CompressionLevel | Gets or sets the level of data compression. Compression levels range from 0 to 9.
OverwriteExistingFiles | Gets or sets whether existing files will be overwritten during decompression.
Password | Sets the password that will be used for encryption / decryption during zipping or unzipping. Setting this property to an empty string ("") will disable encryption.
StorePaths | Gets or sets whether the path of the processed files will be included into the archive. If set to false, only file names will be stored.
TemporaryPath | Temporary file will be created during compression process. If this parameter is an empty string, temporary system folder will be used to accommodate this.

Public Methods

AddFiles | Add new files to the archive. If archive does not exist, it will be created.
ArchiveExists | Use this method to check if archive file exists at the path passed through the class constructor.
CombineSpannedArchive | Combines spanned archive into single file archive.
DeleteFiles | Deletes files from the archive.
ExtractFiles | Extracts files from the archive.
FixArchive | This method will attempt to fix corrupted zip archive.
GetArchiveComment | Use this method to retrieve the zip archive comment.
ListFiles | Lists files that are stored inside the archive through the FileInfoEventHandler.
MoveFiles | Moves new files to the archive. If archive does not exist, it will be created.
QuickCombineSpannedArchive | Static method for combining spanned archive into single file archive.
QuickSpanArchive | Static method for spanning existing archive to multiple smaller files.
QuickUnZip | Static method for quick and easy unzipping.
QuickZip | Static method for quick and easy zipping.
SetArchiveComment | Use this method to set the zip archive comment.
SetArchiveTimeStamp | Use this method if you want to set the date and time of the specified archive to the last modification date and time of its newest zip item.
SpanArchive | Spans existing archive to multiple smaller files .
TestArchive | Use this method if you want to perform a quick check of the validity of the zip archive.

See Also

ZipArchive class


temp

AddFiles | Add new files to the archive. If archive does not exist, it will be created.
ArchiveExists | Use this method to check if archive file exists at the path passed through the class constructor.
CombineSpannedArchive | Combines spanned archive into single file archive.
DeleteFiles | Deletes files from the archive.
ExtractFiles | Extracts files from the archive.
FixArchive | This method will attempt to fix corrupted zip archive.
GetArchiveComment | Use this method to retrieve the zip archive comment.
ListFiles | Lists files that are stored inside the archive through the FileInfoEventHandler.
MoveFiles | Moves new files to the archive. If archive does not exist, it will be created.
QuickCombineSpannedArchive | Static method for combining spanned archive into single file archive.
QuickSpanArchive | Static method for spanning existing archive to multiple smaller files.
QuickUnZip | Static method for quick and easy unzipping.
QuickZip | Static method for quick and easy zipping.
SetArchiveComment | Use this method to set the zip archive comment.
SetArchiveTimeStamp | Use this method if you want to set the date and time of the specified archive to the last modification date and time of its newest zip item.
SpanArchive | Spans existing archive to multiple smaller files .
TestArchive | Use this method if you want to perform a quick check of the validity of the zip archive.


_ZipEvents_Members

ZipEvents Members

Public Events

AnalyzingZipContents | Provides information about the progress when adding files to or updating an existing archive.
FileCompressed | Occurs after the compression of each file.
FileDecompressed | Occurs after the decompression of each file.
FileInfo | Occurs if the ListFiles method is executed. It is useful for getting information about files included in the zip archive.
FileStartedCompressing | Occurs when each file starts compressing.
FileStartedDecompressing | Occurs when each file starts decompressing.
FileStatus | Occurs during the processing of the file (zipping/unzipping), as a result of the processing progress.
GlobalInfo | Occurs after the ProcessStarted event and before actual processing started.
ProcessEnded | Occurs when the process of zipping or unzipping ends.
ProcessStarted | Occurs when the process of zipping or unzipping starts.
ProcessMessages | Occurs during the processing of the file and it helps in the exchange of messages between the user and the zipping/unzipping process.
RemovingFile | Occurs when the file is being removed from a zip archive.
SkippingFile | Occurs when the file is being skipped from processing .
SpanningMessage | Occurs during the multi disk process and it helps in the exchange of messages between the user and the process of splitting the archive.
SpanningProcessStarted | Occurs when the process of splitting a zip file ends.
SpanningProcessEnded | Occurs when the process of splitting a zip file starts.
TetstingFile | Occurs when the zip archive is being tested.

See Also

ZipEvents Class


AnalyzingZipContents Event

ZipEvents.AnalyzingZipContents Event

Provides information about the progress when adding files to or updating an existing archive.

[C#]

public event AnalyzingZipContentsEventHandler AnalyzingZipContents;

The event handler receives a AnalyzingZipContentsInfo containing data related to the AnalyzingZipContents.

See Also

ZipEvents Class

Event

public delegate void AnalyzingZipContentsEventHandler(object TheSender, AnalyzingZipContentsInfo TheArgs)

{

...

}

Class AnalyzingZipContentsInfo properties

FilesProcessed | get | Number of the expression representing the current number of analyzed files
TotalFiles | get | Number of the expression representing the total number of files in an archive that need to be analyzed
PercentProcessed | get | Number of the expression representing the percentage of currently analyzed files

Remarks:

This event is used to give the user feedback information when adding new files or updating an archive that contains a large number of files. Before the archive is processed, the component needs to scan the existing files. This operation can be lengthy when the zip file contains five thousand files or more. This event is triggered up to a maximum of 101 times. If the zip file has more than 100 files it is triggered once for each possible value of the lPercentProcessed parameter (from 0% to 100%), otherwise it will be triggered once for each file in the archive.


FileCompressed Event

ZipEvents.FileCompressed Event

Occurs after the compression of each file.

[C#]

public event FileCompressedEventHandler FileCompressed;

Event Data

The event handler receives a FileCompressedInfo containing data related to the FileCompressed event.

See Also

ZipEvents Class

Event

public delegate void FileCompressedEventHandle(object TheSender, FileCompressedInfo TheArgs)

{

...

}

Class FileCompressedInfo properties

FileName | get | String expression containing the name of the compressed file.
OriginalFileSize | get | Value of the expression containing the file size before compression (expressed in bytes)
CompressedFileSize | get | Number of the expression containing the file size after compression (expressed in bytes)
Crc | get | Value of the expression representing the CRC value


FileDecompressed Event

ZipEvents.FileDecompressed Event

Occurs after the decompression of each file.

[C#]

public event FileDecompressedEventHandler FileDecompressed;

Event Data

The event handler receives a FileDecompressedInfo containing data related to the FileDecompressed event.

See Also

ZipEvents Class

Event

public delegate void FileDecompressedEventHandle(object TheSender, FileDecompressedInfo TheArgs)

{

...

}

Class FileDecompressedInfo properties

FileName | get | String expression containing the name of the compressed file.
OriginalFileSize | get | Value of the expression containing the file size after decompression (expressed in bytes)
CompressedFileSize | get | Number of the expression containing the file size before decompression (expressed in bytes)
Crc | get | Value of the expression representing the CRC value


FileInfo Event

ZipEvents.FileInfo Event

Occurs if the ListFiles method is executed. It is useful for getting information about files included in the zip archive.

[C#]

public event FileInfoEventHandler FileInfo;

Event Data

The event handler receives a FileInfoInfo containing data related to the FileInfoevent.

See Also

ZipEvents Class

Event

public delegate void FileInfoEventHandler(object TheSender, FileInfoInfo TheArgs)

{

...

}

Class FileInfoInfo properties

FileName | get | String expression containing the name of the file.
Comment | get | String expression containing the file comment
UncompressedSize | get | Value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | get | Value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | get | Value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | get | Enumeration value of type FileAttributes containing the DOS file attributes
Crc | get | Value of the expression representing the CRC value
LastModified | get | value of the expression indicating the day of the last modification
Method | get | Enumeration value of type CompressionMethod indicating the compression method
Encrypted | get | Boolean expression (true if a file is protected with a password, otherwise false)

Remarks

This event is affected by the FilesToProcess and FilesToExclude properties.


FileStartedCompressing Event

ZipEvents.FileStartedCompressing Event

Occurs when each file starts compressing.

[C#]

public event FileStartedCompressingEventHandler FileStartedCompressing;

Event Data

The event handler receives a FileStartedCompressingInfo containing data related to the FileStartedCompressing.

See Also

ZipEvents Class

Event

public delegate void FileStartedCompressingEventHandler(object TheSender, FileStartedCompressingInfo TheArgs)

{

...

}

Class FileStartedCompressingInfo properties:

FileName | get,set | String expression containing name of file
Comment | get,set | String expression containing file comment
SourceFilename | get,set | String expression containing the original file name
Size | get | Number of the expression representing the original file size
Attributes | get,set | Enumeration value of type ZipFileAttributes containing DOS file attributes
Modified | get,set | Number expression indicating day of last modification
Method | get,set | Enumeration value of typeZipCompressionMethod indicating the compression method
Encrypted | get,set | Boolean expression (true if a file is protected with a password, otherwise false)


FileStartedDecompressing Event

ZipEvents.FileStartedDecompressing Event

Occurs when each file starts decompressing.

[C#]

public event FileStartedDecompressingEventHandler FileStartedDecompressing;

Event Data

The event handler receives a FileStartedDecompressingInfo containing data related to the FileStartedDecompressing.

See Also

ZipEvents Class

Event

public delegate void FileStartedDecompressingEventHandler(object TheSender, FileStartedDecompressingInfo TheArgs)

{

...

}

Class FileStartedDecompressingInfo properties:

FileName | get | String expression containing name of file
Comment | get | String expression containing file comment
DestFilename | get,set | String expression containing path where the file will be stored
Size | get | Number expression containing file size before compression (expressed in bytes)
CompressedSize | get | Number expression containing file size before decompression (expressed in bytes)
CompressionRatio | get | Number expression containing compression ratio (If the UncompressedSize = 100, and the CompressedSize = 30, CompressionRatio = 70)
Attributes | get,set | Enumeration value of type ZipFileAttributes containing DOS file attributes
Modified | get,set | Number expression indicating day of last modification
Crc | get | Number expression representing CRC value
Method | get | Enumeration value of typeZipCompressionMethod indicating the compression method
Encrypted | get | Boolean expression (true if a file is protected with a password, otherwise false)


FileStatus Event

ZipEvents.FileStatus Event

Occurs during the processing of the file (zipping/unzipping), as a result of the processing progress.

[C#]

public event FileStatusEventHandler FileStatus;

Event Data

The event handler receives a FileStatusInfo containing data related to the FileStatus event.

See Also

ZipEvents Class


GlobalInfo Event

ZipEvents.GlobalInfo Event

Occurs after the ProcessStarted event and before actual processing started.

[C#]

public event GlobalInfoEventHandler GlobalInfo;

Event Data

The event handler receives a GlobalInfoInfo containing data related to the GlobalInfo.

See Also

ZipEvents Class

Event

public delegate void GlobalInfoEventHandle(object TheSender, GlobalInfoInfo TheArgs)

{

...

}

Class GlobalInfoInfo properties

Type | Name |  | Description
int | TotalSize | get | A number expression containing the total file size of all the files that are going to be processed: compressed or decompressed (expressed in bytes)
int | TotalFiles | get | A number expression containing the total file size of all the files that are going to be processed: compressed or decompressed (expressed in bytes)


ProcessEnded Event

ZipEvents.ProcessEnded Event

Occurs when the process of zipping or unzipping ends.

[C#]

public event ProcessEndedEventHandler ProcessEnded;

See Also

ZipEvents Class

Event:

public delegate void ProcessEndedEventHandler(object TheSender);

{

...

}


ProcessMessages Event

ZipEvents.ProcessMessages Event

Occurs during the processing of the file and it helps in the exchange of messages between the user and the zipping/unzipping process.

[C#]

public event ProcessMessagesEventHandler ProcessMessages;

Event Data

The event handler receives a ProcessMessagesInfo containing data related to the ProcessMessages.

See Also

ZipEvents Class

Event

public delegate void ProcessMessagesEventHandle(object TheSender, ProcessMessagesInfo TheArgs)

{

...

}

Class ProcessMessagesInfo properties

Abort

get,set

An expression indicating whether the process will be terminated. If Abort=true process will be terminated .

Remarks

Use this event to direct the process to continue or to terminate.


ProcessStarted Event

ZipEvents.ProcessStarted Event

Occurs when the process of zipping or unzipping starts.

[C#]

public event ProcessStartedEventHandler ProcessStarted;

See Also

ZipEvents Class

Event:

public delegate void ProcessStartedEventHandler(object TheSender);

{

...

}


RemovingFile Event

ZipEvents.RemovingFile Event

Occurs when the file is being removed from a zip archive.

[C#]

public event RemovingFileEventHandler RemovingFile;

Event Data

The event handler receives a RemovingFileInfo containing data related to the RemovingFile.

See Also

ZipEvents Class

Event

public delegate void RemovingFileEventHandler(object TheSender, RemovingFileInfo TheArgs)

{

...

}

Class RemovingFileInfo members:

FileName | get | String expression containing the name of the file.
Comment | get | String expression containing the file comment
FilenameOnDisk | get | String expression containing the path where the file would be stored
Size | get | Value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | get | Value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | get | Value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | get | Enumeration value of type FileAttributes containing the DOS file attributes
Crc | get | Value of the expression representing the CRC value
LastModified | get | value of the expression indicating the day of the last modification
Method | get | Enumeration value of type CompressionMethod indicating the compression method
Encrypted | get | Boolean expression (true if a file is protected with a password, otherwise false)


SkippingFile Event

ZipEvents.SkippingFile Event

Occurs when the file is being skipped from processing.

[C#]

public event SkippingFileEventHandler SkippingFile;

Event Data

The event handler receives a SkippingFileInfo containing data related to the SkippingFile.

See Also

ZipEvents Class

Event

public delegate void SkippingFileEventHandler(object TheSender, SkippingFileInfo TheArgs)

{

...

}

Class SkippingFileInfo properties

FileName | get | String expression containing the name of the file.
Comment | get | String expression containing the file comment
FilenameOnDisk | get | String expression containing the path where the file would be stored
Size | get | Value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | get | Value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | get | Value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | get | Enumeration value of type FileAttributes containing the DOS file attributes
Crc | get | Value of the expression representing the CRC value
LastModified | get | value of the expression indicating the day of the last modification
Method | get | Enumeration value of type CompressionMethod indicating the compression method
Encrypted | get | Boolean expression (true if a file is protected with a password, otherwise false)


SpanningMessage Event

ZipEvents.SpanningMessage Event

Occurs during the multi disk process and it helps in the exchange of messages between the user and the process of splitting the archive.

[C#]

public event SpanningMessageEventHandler SpanningMessage;

Event Data

The event handler receives a SpanningMessageInfo containing data related to the SpanningMessage.

See Also

ZipEvents Class


SpanningProcessEnded Event

ZipEvents.SpanningProcessEnded Event

Occurs when the process of splitting a zip file ends.

[C#]

public event SpanningProcessEndedEventHandler SpanningProcessEnded;

See Also

ZipEvents Class


SpanningProcessStarted Event

ZipEvents.SpanningProcessStarted Event

Occurs when the process of splitting a zip file starts.

[C#]

public event SpanningProcessStartedEventHandler SpanningProcessStarted;

See Also

ZipEvents Class


TestingFile Event

ZipEvents.TestingFile Event

Occurs when the zip archive is being tested.

[C#]

public event TestingFileEventHandler TestingFile;

Event Data

The event handler receives a TestingFileInfo containing data related to the TestingFile.

See Also

ZipEvents Class

Event

public delegate void TestingFileEventHandler(object TheSender, TestingFileInfo TheArgs)

{

...

}

Class TestingFileInfo properties

FileName | get | String expression containing the name of the file.
Comment | get | String expression containing the file comment
Size | get | Value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | get | Value of the expression containing the file size before decompression (expressed in bytes)
Attributes | get | Enumeration value of type FileAttributes containing the DOS file attributes
Crc | get | Value of the expression representing the CRC value
LastModified | get | value of the expression indicating the day of the last modification
Method | get | Enumeration value of type CompressionMethod indicating the compression method
Encrypted | get | Boolean expression (true if a file is protected with a password, otherwise false)


ZipEvents

ZipEvents Class

Class contains events that can be raised by the ZipArchive class. ZipEvents is passed to the ZipArchive through constructor.

[C#]

public class ZipEvents

Requirements

Namespace: Polar.Zip Namespace

Assembly: Polar.Zip.dll


MojiKomentari

1)Jedan spanning Event nedostaje uopce u ZipNetu

2)nemam dokumentaciju od FileStartedCompressing ,pa sam sam napravio konstruktor i ostalo preko obicnog zipa


_AnalazingZipContents__Delegate

AnalyzingZipContentsEventHandler Delegate

Represents the method that will handle the AnalyzingZipContents event of ZipEvents Class.

[C#]

public delegate void AnalyzingZipContentsEventHandler (

object sender,

AnalyzingZipContentsInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the AnalyzingZipContentsEventHandler delegate declaration.

sender

The source of the event.

e

A AnalyzingZipContentsInfo object that contains the event data.

See Also


_AnalyzingZipContentsInfo_C

AnalyzingZipContentsInfo Constructor (int, int , int)

Initializes a new instance of the AnalyzingZipContentsInfo class .

[C#]

public AnalyzingZipContentsInfo (

int FilesProcessed,

int TotalFiles,

int PercentProcessed

)

See Also


_AnalyzingZipContents_PropertyPercentProcessed

AnalyzingZipContentsInfo.PercentProcessed Property

Gets the number of the expression representing the percentage of currently analyzed files.

[C#]

public int PercentProcessed {get; }

See Also


_AnalyzingZipContents_PropertyTotalFiles

AnalyzingZipContentsInfo.TotalFiles Property

Gets the number of the expression representing the total number of files in an archive that need to be analyzed.

[C#]

public int TotalFiles {get; }

See Also


_AnalyzingZipContentsInfo_1

AnalyzingZipContentsInfo Class

AnalyzingZipContentsInfo contains data related to the AnalyzingZipContents event.

For a list of all members of this type, see AnalyzingZipContentsInfo members.

[C#]

public class AnalyzingZipContentsInfo;

See Also

AnalyzingZipContentsInfo members


_AnalyzingZipContentsInfo_M

AnalyzingZipContentsInfo Members

Public Constructor

AnalyzingZipContentsInfo Constructor

Initializes a new instance of the AnalyzingZipContentsInfo class

Public Properties

FilesProcessed | Gets the number of the expression representing the current number of analyzed files
TotalFiles | Gets the number of the expression representing the total number of files in an archive that need to be analyzed
PercentProcessed | Gets the number of the expression representing the percentage of currently analyzed files

See Also

AnalyzingZipContentsInfo Class


_AnalyzingZipContents_PropertyFileProcessed

AnalyzingZipContentsInfo.FilesProcessed Property

Gets the number or the expression representing the current number of analyzed files.

[C#]

public int FilesProcessed {get; }

See Also


_FileCompressed_PropertyCompressedSize

FileCompressedInfo.CompressedFileSize Property

Gets value of the expression containing the file size after compression (expressed in bytes).

[C#]

public int CompressedFileSize {get; }

See Also


_FileCompressed_PropertyCRC

FileCompressedInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_FileCompressed_C

FileCompressedInfo Constructor (string, int , int , unsigned int)

Initializes a new instance of the FileCompressedInfo class .

[C#]

public FileCompressedInfo (

string Filename,

int OriginalFileSize,

int CompressedFileSize,

unsigned int Crc

);

See Also


_FileCompressedInfo_ 1

FileCompressedInfo Class

FileCompressedInfo contains data related to the FileCompressed event.

For a list of all members of this type, see FileCompressedInfo members.

[C#]

public class FileCompressedInfo;

See Also

FileCompressedInfo members


_FileCompressed_Delegate

FileCompressedEventHandler Delegate

Represents the method that will handle the FileCompressed event of ZipEvents Class.

[C#]

public delegate void FileCompressedEventHandler (

object sender,

FileCompressedInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the FileCompressedEventHandler delegate declaration.

sender

The source of the event.

e

A FileCompressedInfo object that contains the event data.

See Also


_FileCompressedInfo M

FileCompressedInfo Members

Public Constructor

FileCompressedInfo Constructor

Initializes a new instance of the FileCompressedInfo class

Public Properties

FileName | Gets string expression containing the name of the compressed file.
OriginalFileSize | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedFileSize | Gets number or the expression containing the file size after compression (expressed in bytes)
Crc | Gets value of the expression representing the CRC value

See Also

FileCompressedInfo Class


_FileCompressed_PropertyName

FileCompressedInfo.FileName Property

Gets string expression containing the name of the compressed file.

[C#]

public string FileName {get;}

See also


_FileCompressed_PropertySize

FileCompressedInfo.OriginalFileSize Property

Gets value of the expression containing the file size before compression (expressed in bytes).

[C#]

public int OriginalFileSize {get; }

See Also


_FileDecompressed_C

FileDecompressedInfo Constructor ( string, int , int , unsigned int)

Initializes a new instance of the FileDecompressedInfo class .

[C#]

public FileDecompressedInfo (

string Filename,

int OriginalFileSize,

int CompressedFileSize,

unsigned int Crc

);

See Also


_FileDecompressed_Delegate

FileDecompressedEventHandler Delegate

Represents the method that will handle the FileDecompressed event of ZipEvents Class.

[C#]

public delegate void FileDecompressedEventHandler (

object sender,

FileDecompressedInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the FileDecompressedEventHandler delegate declaration.

sender

The source of the event.

e

A FileDecompressedInfo object that contains the event data.

See Also


_FileDecompressed_PropertyCompressedSize

FileDecompressedInfo.CompressedFileSize Property

Gets value of the expression containing the file size before decompression (expressed in bytes).

[C#]

public int CompressedFileSize {get; }

See Also


_FileDecompressed_PropertyCRC

FileDecompressedInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_FileDecompressed_PropertyName

FileDecompressedInfo.Filename Property

Gets string expression containing the name of the decompressed file.

[C#]

public string Filename {get;}

See also


_FileDeCompressed_PropertyOriginalSize

FileDecompressedInfo.OriginalFileSize Property

Gets value of the expression containing the file size after decompression (expressed in bytes).

[C#]

public int OriginalFileSize {get; }

See Also


_FileDecompressedInfo_ 1

FileDecompressedInfo Class

FileDecompressedInfo contains data related to the FileDecompressed event.

For a list of all members of this type, see FileDecompressedInfo members.

[C#]

public class FileDecompressedInfo;

See Also

FileDecompressedInfo members


_FileDecompressedInfo_M

FileDecompressedInfo Members

Public Constructor

FileDecompressedInfo Constructor

Initializes a new instance of the FileDecompressedInfo class

Public Properties

Filename | Gets string expression containing the name of the compressed file.
OriginalFileSize | Gets value of the expression containing the file size after decompression (expressed in bytes)
CompressedFileSize | Gets number or the expression containing the file size before decompression (expressed in bytes)
Crc | Gets value of the expression representing the CRC value

See Also


_FileInfo_Delegate

FileInfoEventHandler Delegate

Represents the method that will handle the FileInfo event of ZipEvents Class.

[C#]

public delegate void FileInfoEventHandler (

object sender,

FileInfoInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the FileInfoEventHandler delegate declaration.

sender

The source of the event.

e

A FileInfoInfo object that contains the event data.

See Also


_FileInfo_PropertyAttributes

FileInfoInfo.Attributes Property

Gets enumeration value of type ZipFileAttributes containing the DOS file attributes

[C#]

public ZipFileAttributes Attributes {get; }

See Also


_FileInfo_PropertyComment

FileInfoInfo.Comment Property

Gets string expression containing the file comment.

[C#]

public string Comment {get;}

See also


_FileInfo_PropertyCompressoinRatio

FileInfoInfo.CompressionRatio Property

Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)

[C#]

public int CompressionRatio {get; }

See Also


_FileInfo_PropertyCompressedSize

FileInfoInfo.CompressedSize Property

Gets value of the expression containing the file size before decompression (expressed in bytes)).

[C#]

public int CompressedSize {get; }

See Also


_FileInfo_PropertyCrc

FileInfoInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_FileInfo_PropertyEncrypted

FileInfoInfo.Encrypted Property

Gets boolean expression (true if a file is protected with a password, otherwise false) .

[C#]

public bool Encrypted {get;}

See also


_FileInfo_PropertyFilename

FileInfoInfo.Filename Property

Gets string expression containing the name of the file.

[C#]

public string Filename {get;}

See also


_FileInfo_PropertyLastModified

FileInfoInfo.LastModified Property

Gets value of the expression indicating the day of the last modification.

[C#]

public DateTime LastModified {get; }

See Also


_FileInfo_PropertyMethod

FileInfoInfo.Method Property

Gets enumeration value of type ZipCompressionMethod indicating the compression method.

[C#]

public ZipCompressionMethod Method {get; }

See Also


_FileInfo_PropertyUncompressedSize

FileInfoInfo.UncompressedSize Property

Gets value of the expression containing the file size before compression (expressed in bytes)

[C#]

public int UncompressedSize {get;}

See also


_FileInfoInfo_1

FileInfoInfo Class

FileInfoInfo contains data related to the FileInfo event.

For a list of all members of this type, see FileInfoInfo members.

[C#]

public class FileInfoInfo;

See Also

FileInfoInfo members


_FileInfoInfo_C

FileInfoInfo Constructor ( string, string , int , int, int , unsigned int, ZipFileAtributttes, DateTime ,ZipCompressionMode, bool)

Initializes a new instance of the FileInfoInfo class .

[C#]

public FileInfoInfo (

string Filename,

string Comment,

int UncompressedSize,

int CompressedSize,

int CompressionRatio,

unsigned int Crc,

ZipFileAttributes Attributes,

DateTime LastModified,

ZipCompressionMethod Method,

bool Encrypted

);

See Also


_FileInfoInfo_M

FileInfoInfo Members

Public Constructor

FileInfoInfo Constructor

Initializes a new instance of the FileInfoInfo class

Class Properties

FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
UncompressedSize | Gets value expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value expression containing the file size before decompression (expressed in bytes)
CompressionRatio | Gets value expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | Gets numeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value expression representing the CRC value
LastModified | Gets value expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also

FileInfoInfo Class


_FileStartedCompressing_Delegate

FileStartedCompressingEventHandler Delegate

Represents the method that will handle the FileStartedCompressing event of ZipEvents Class.

[C#]

public delegate void FileStartedCompressingEventHandler (

object sender,

FileStartedCompressingInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the FileStartedCompressingEventHandler delegate declaration.

sender

The source of the event.

e

A FileStartedCompressingInfo object that contains the event data.

See Also


_FileStartedCompressing_PropertyAttributes

FileStartedCompressingInfo.Attributes Property

Gets or sets enumeration value of type ZipFileAttributes containing the DOS file attributes

[C#]

public ZipFileAttributes Attributes {get;set; }

See Also


_FileStartedCompressing_PropertyComment

FileStartedCompressingInfo.Comment Property

Gets or sets string expression containing the file comment.

[C#]

public string Comment {get; set;}

See also


_FileStartedCompressing_PropertyEncrypted

FileStartedCompressingInfo.Encrypted Property

Gets or sets boolean expression (true if a file is protected with a password, otherwise false).

[C#]

public bool Encrypted {get;set;}

See also


_FileStartedCompressing_PropertyFileName

FileStartedCompressingInfo.Filename Property

Gets or sets string expression containing name of file

[C#]

public string Filename {get; set;}

See also


_FileStartedCompressing_PropertyLastModified

FileStartedCompressingInfo.LastModified Property

Gets or sets value of the expression indicating the day of the last modification.

[C#]

public DateTime LastModified {get; set;}

See Also


_FileStartedCompressing_PropertyMethod

FileStartedCompressingInfo.Method Property

Gets enumeration value of type ZipCompressionMethod indicating the compression method.

[C#]

public ZipCompressionMethod Method {get;set;}

See Also


_FileStartedCompressing_PropertySize

FileStartedCompressingInfo.Size Property

Gets number of the expression representing the original file size

[C#]

public int Size {get; }

See Also


_FileStartedCompressing_PropertySourceFilename

FileStartedCompressingInfo.SourceFilename Property

Gets string expression containing the original file name.

[C#]

public string SourceFilename {get; }

See also


_FileStartedCompressingInfo_1

FileStartedCompressingInfo Class

FileStartedCompressingInfo contains data related to the FileStartedCompressing event.

For a list of all members of this type, see FileStartedCompressingInfo members.

[C#]

public class FileStartedCompressingInfo;

See Also

FileStartedCompressingInfo members


_FileStartedCompressingInfo_C

FileStartedCompressingInfo Constructor ( string, string , string, int , ZipFileAtributttes, DateTime ,ZipCompressionMode, bool)

Initializes a new instance of the FileStartedCompressingInfo class .

[C#]

public FileStartedCompressingInfo (

string Filename,

string Comment,

string SourceFilename,

int Size,

ZipFileAttributes Attributes,

DateTime LastModified,

ZipCompressionMethod Method,

bool Encrypted

);

See Also


_FileStartedCompressingInfo_M

FileStartedCompressingInfo Members

Public Constructor

FileStartedCompressingInfo Constructor

Initializes a new instance of the FileStartedCompressingInfo class

Class Properties

FileName | Gets or sets string expression containing name of file
Comment | Gets or sets string expression containing file comment
SourceFilename | Gets string expression containing the original file name
Size | Gets number of the expression representing the original file size
Attributes | Gets or sets enumeration value of type ZipFileAttributes containing DOS file attributes
LastModified | Gets or sets number expression indicating day of last modification
Method | Gets or sets enumeration value of typeZipCompressionMethod indicating the compression method
Encrypted | Gets or sets boolean expression (true if a file is protected with a password, otherwise false)

See Also

FileStartedCompressingInfo class


FileStartedCompressing_Delegate

FileStartedDecompressingEventHandler Delegate

Represents the method that will handle the FileStartedDecompressing event of ZipEvents Class.

[C#]

public delegate void FileStartedDecompressingEventHandler (

object sender,

FileStartedDecompressingInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the FileStartedDecompressingEventHandler delegate declaration.

sender

The source of the event.

e

A FileStartedDecompressingInfo object that contains the event data.

See Also


FileStartedCompressing_PropertyAttributes

FileStartedDecompressingInfo.Attributes Property

Gets or sets enumeration value of type ZipFileAttributes containing the DOS file attributes

[C#]

public ZipFileAttributes Attributes {get; set;}

See Also


FileStartedCompressing_PropertyComment

FileStartedDecompressingInfo.Comment Property

Gets string expression containing the file comment.

[C#]

public string Comment {get;}

See also


FileStartedCompressing_PropertyCompressedSize

FileStartedDecompressingInfo.CompressedSize Property

Gets value of the expression containing the file size before decompression (expressed in bytes)).

[C#]

public int CompressedSize {get; }

See Also


FileStartedCompressing_PropertyCrc

FileStartedDecompressingInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


FileStartedCompressing_PropertyEncrypted

FileStartedDecompressingInfo.Encrypted Property

Gets boolean expression (true if a file is protected with a password, otherwise false) .

[C#]

public bool Encrypted {get;}

See also


FileStartedCompressing_PropertyFileanme

FileStartedDecompressingInfo.Filename Property

Gets string expression containing the name of the file.

[C#]

public string Filename {get;}

See also


FileStartedCompressing_PropertyLastModified

FileStartedDecompressingInfo.LastModified Property

Gets or sets value of the expression indicating the day of the last modification.

[C#]

public DateTime LastModified {get; set;}

See Also


FileStartedCompressing_PropertyMethod

FileStartedDecompressingInfo.Method Property

Gets enumeration value of type ZipCompressionMethod indicating the compression method.

[C#]

public ZipCompressionMethod Method {get; }

See Also


FileStartedCompressing_PropertySize

FileStartedDecompressingInfo.Size Property

Gets value of the expression containing the file size before compression (expressed in bytes)

[C#]

public int Size {get;}

See also


FileStartedCompressing_PropertyDestinationFilename

FileStartedDecompressingInfo.DestinationFilename Property

Gets or sets string expression containing path where the file will be stored.

[C#]

public string DestinationFilename {get; set;}

See also


FileStartedCompressing_PropertyCompressionRation

FileStartedDecompressingInfo.CompressionRatio Property

Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)

[C#]

public int CompressionRatio {get; }

See Also


FileStartedCompressingInfo_1

FileStartedDecompressingInfo Class

FileStartedDecompressingInfo contains data related to the FileStartedDecompressing event.

For a list of all members of this type, see FileStartedDecompressingInfo members.

[C#]

public class FileStartedDecompressingInfo;

See Also

FileStartedDecompressingInfo members


FileStartedCompressingInfo_c

FileStartedDecompressingInfo Constructor (string , string ,string , int , int ,int , ZipFileAttributes , unsigned int ,DateTime , ZipCompressionMethod , bool )

Initializes a new instance of the FileStartedDecompressingInfo class .

[C#]

public FileStartedDecompressingInfo (

string Filename,

string Comment,

string DestinationFilename,

int Size,

int CompressedSize,

int CompressionRatio,

ZipFileAttributes Attributes,

unsigned int Crc,

DateTime LastModified,

ZipCompressionMethod Method,

bool Encrypted

);

See Also


FileStartedCompressingInfo_m

FileStartedDecompressingInfo Members

Public Constructor

FileStartedDecompressingInfo Constructor

Initializes a new instance of the FileStartedDecompressingInfo class

Class Properties

Filename | Gets string expression containing name of file
Comment | Gets string expression containing file comment
DestinationFilename | Gets or sets string expression containing path where the file will be stored
Size | Gets number expression containing file size before compression (expressed in bytes)
CompressedSize | Gets number expression containing file size before decompression (expressed in bytes)
CompressionRatio | Gets number expression containing compression ratio (If the UncompressedSize = 100, and the CompressedSize = 30, CompressionRatio = 70)
Attributes | Sets or gets enumeration value of type ZipFileAttributes containing DOS file attributes
LastModified | Gets or sets number expression indicating day of last modification
Crc | Gets number expression representing CRC value
Method | Gets enumeration value of typeZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also

FileStartedDecompressingInfo class


_FileStatus_Delegate

FileStatusEventHandler Delegate

Represents the method that will handle the FileStatus event of ZipEvents Class.

[C#]

public delegate void FileStatusEventHandler (

object sender,

FileStatusInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the FileStatusEventHandler delegate declaration.

sender

The source of the event.

e

A FileStatusInfo object that contains the event data.

See Also


_FileStatus_PropertyCompressedSize

FileStatusInfo.CompressedSize Property

Gets number of the expression representing the compressed file size.

[C#]

public int CompressedSize {get; }

See Also


_FileStatus_PropertyCompressionRatio

FileStatusInfo.CompressionRatio Property

Gets number of the expression representing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70).

[C#]

public int CompressionRatio {get; }

See Also


_FileStatus_PropertyCrc

FileStatusInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_FileStatus_PropertyFileCompleted

FileStatusInfo.FileCompleted Property

Gets boolean expression representing the status of the processing (true if the processing is finished (last call of the FileStatus event), otherwise false ).

[C#]

public bool FileCompleted {get; }

See Also


_FileStatus_PropertyFileName

FileStatusInfo.Filename Property

Gets string expression containing the path and the filename of the file processed ( when zipping, this is the path and filename of the file exactly as it is being stored in the zip file. When unzipping or testing, this is the path and filename of the file exactly as it is currently stored in the zip file).

[C#]

public string Filename {get;}

See also


_FileStatus_PropertyFilePartProcessed

FileStatusInfo.FilePartProcessed Property

Gets number of the expression representing the size of the file processed since the last call of the FileStatus event.

[C#]

public int FilePartProcessed {get; }

See Also


_FileStatus_PropertyFileProcent

FileStatusInfo.FilePercent Property

Gets number of the expression representing the ratio of the currently processed file part and total file size, expressed in percentages.

[C#]

public double FilePercent {get; }

See Also


_FileStatus_PropertyFileProcessed

FileStatusInfo.FileProcessed Property

Gets number of the expression representing the currently processed file size. (It counts from zero when each file processing begins.) This value is expressed in bytes.

[C#]

public int FileProcessed {get; }

See Also


_FileStatus_PropertySize

FileStatusInfo.Size Property

Gets number of the expression representing the original file size.

[C#]

public int Size {get; }

See Also


_FileStatus_PropertyTotalPercent

FileStatusInfo.TotalPercent Property

Gets number of the expression representing ratio of the currently processed file size and total processing file size, expressed in percents.

[C#]

public double TotalPercent {get; }

See Also


_FileStatus_PropertyTotalProcessed

FileStatusInfo.TotalProcessed Property

Gets number of the expression representing the size that is currently processed, expressed in bytes.

[C#]

public int TotalProcessed {get; }

See Also


_FileStatusInfo_1

FileStatusInfo Class

FileStatusInfo contains data related to the FileStatus event.

For a list of all members of this type, see FileStatusInfo members.

[C#]

public class FileStatusInfo;

See Also

FileStatusInfo members


_FileStatusInfo_C

FileStatusInfo Constructor ( string , int , int , int , double , int , int , double , int, unsigned int , bool )

Initializes a new instance of the FileStatusInfo class .

[C#]

public FileStatusInfo (

string Filename,

int Size,

int CompressedSize,

int FileProcessed,

double FilePercent,

int CompressionRatio,

int TotalProcessed,

double TotalPercent,

int FilePartProcessed,

unsigned int Crc,

bool FileCompleted

);

See Also


_FileStatusInfo_M

FileStatusInfo Members

Public Constructor

FileStatusInfo Constructor

Initializes a new instance of the FileStatusInfo class

Class Properties

Filename | Gets string expression containing the path and the filename of the file processed ( when zipping, this is the path and filename of the file exactly as it is being stored in the zip file. When unzipping or testing, this is the path and filename of the file exactly as it is currently stored in the zip file)
Size | Gets number of the expression representing the original file size
CompressedSize | Gets number of the expression representing the compressed file size
FileProcessed | Gets number of the expression representing the currently processed file size. (It counts from zero when each file processing begins.) This value is expressed in bytes
FilePercent | Gets number of the expression representing the ratio of the currently processed file part and total file size, expressed in percentages.
CompressionRatio | Gets number of the expression representing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70
TotalProcessed | Gets number of the expression representing the size that is currently processed, expressed in bytes.
TotalPercent | Gets number of the expression representing ratio of the currently processed file size and total processing file size, expressed in percents
FilePartProcessed | Gets number of the expression representing the size of the file processed since the last call of the FileStatus event
Crc | Gets number of the expression representing: zipping - CRC reached by the time,unzipping - CRC value
FileCompleted | Gets boolean expression representing the status of the processing (true if the processing is finished (last call of the FileStatus event), otherwise false ).

See Also

FileStatusInfo class


_GlobalInfo_Delegate

GlobalInfoEventHandler Delegate

Represents the method that will handle the GlobalInfo event of ZipEvents Class.

[C#]

public delegate void GlobalInfoEventHandler (

object sender,

GlobalInfoInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the GlobalInfoEventHandler delegate declaration.

sender

The source of the event.

e

A GlobalInfoInfo object that contains the event data.

See Also


_GlobalInfo_PropertyTotalFiles

GlobalInfoInfo.TotalFiles Property

Gets the number expression containing the total number of the files that are to be processed.

[C#]

public int TotalFiles {get; }

See Also


_GlobalInfo_PropertyTotalSize

GlobalInfoInfo.TotalSize Property

Get the number expression containing the total file size of all the files that are going to be processed: compressed or decompressed (expressed in bytes).

[C#]

public int TotalSize {get; }

See Also


_GlobalInfoInfo_1

GlobalInfoInfo Class

GlobalInfoInfo contains data related to the GlobalInfo event.

For a list of all members of this type, see GlobalInfoInfo members.

[C#]

public class GlobalInfoInfo;

See Also

GlobalInfoInfo members


_GlobalInfoInfo_M

GlobalInfoInfo Members

Public Constructor

GlobalInfoInfo Constructor

Initializes a new instance of the GlobalInfoInfo class

Public Properties

TotalSize | Get the number expression containing the total file size of all the files that are going to be processed: compressed or decompressed (expressed in bytes).
TotalFiles | Gets the number expression containing the total number of the files that are to be processed.

See Also

GlobalInfoInfo Class


_GlobalInfoInfo_C

GlobalInfoInfo Constructor (int, int )

Initializes a new instance of the GlobalInfoInfo class .

[C#]

public GlobalInfoInfo (

int Totalsize,

int TotalFiles,

)

See Also


_ProcessEnded_Delegate

ProcessEndedEventHandler Delegate

Represents the method that will handle the ProcessEnded event of ZipEvents Class.

[C#]

public delegate void ProcessEndedEventHandler (

object sender,

);

Parameters

The declaration of your event handler must have the same parameters as the ProcessEndedEventHandler delegate declaration.

sender

The source of the event.

See Also


_ProcessMessages_Delegate

ProcessMessagesEventHandler Delegate

Represents the method that will handle the ProcessMessages event of ZipEvents Class.

[C#]

public delegate void ProcessMessagesEventHandler (

object sender,

ProcessMessagesInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the ProcessMessagesEventHandler delegate declaration.

sender

The source of the event.

e

A ProcessMessagesInfo object that contains the event data.

See Also


_ProcessMessagesInfo_1

ProcessMessagesInfo Class

ProcessMessagesInfo contains data related to the ProcessMessages event.

For a list of all members of this type, see ProcessMessagesInfo members.

[C#]

public class ProcessMessagesInfo;

See Also

ProcessMessagesInfo members


_ProcessMessagesInfo_C

ProcessMessagesInfo Constructor ( bool)

Initializes a new instance of the ProcessMessagesInfo class .

[C#]

public ProcessMessagesInfo (

bool Abort

);

See Also


_ProcessMessagesInfo_M

ProcessMessagesInfo Members

Public Constructor

ProcessMessagesInfo Constructor

Initializes a new instance of the ProcessMessagesInfo class

Class Properties

Abort

Sets or gets value indicating whether the process will be terminated. If Abort=true process will be terminated .

See Also

ProcessMessagesInfo Class


_ProcessMessagesInfo_PropertyAbort

ProcessMessagesInfo.Abort Property

An expression indicating whether the process will be terminated. If Abort=true process will be terminated.

[C#]

public bool Abort {get;set }

See Also


_ProcessStarted_Delegate

ProcessStartedEventHandler Delegate

Represents the method that will handle the ProcessStarted event of ZipEvents Class.

[C#]

public delegate void ProcessStartedEventHandler (

object sender

);

Parameters

The declaration of your event handler must have the same parameters as the ProcessStartedEventHandler delegate declaration.

sender

The source of the event.

See Also


_RemovingfFileInfo_PropertyAttrbutes

RemovingFileInfo.Zip Namespace

RemovingFileInfo.Attributes Property

Gets enumeration value of type ZipFileAttributes containing the DOS file attributes

[C#]

public ZipFileAttributes Attributes {get; }

See Also


_RemovingfFileInfo_C

RemovingFileInfo Constructor (string , string , string , int , int, int , ZipFileAttributes , unsigned int , DateTime, ZipCompressionMethod , bool )

Initializes a new instance of the RemovingFileInfo class .

[C#]

public RemovingFileInfo (

string Filename,

string Comment,

string FilenameOnDisk,

int Size,

int CompressedSize,

int CompressionRatio,

ZipFileAttributes Attributes,

unsigned int Crc,

DateTime LastModified,

ZipCompressionMethod Method,

bool Encrypted

);

See Also


_RemovingfFileInfo_M

RemovingFileInfo Members

Public Constructor

RemovingFileInfo Constructor

Initializes a new instance of the RemovingFileInfo class

Public Properties

FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
FilenameOnDisk | Gets string expression containing the path where the file would be stored
Size | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | Gets enumeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value of the expression representing the CRC value
LastModified | Gets value of the expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also

RemovingFileInfo class


_RemovingfFileInfo_PropertyComment

RemovingFileInfo.Comment Property

Gets string expression containing the file comment.

[C#]

public string Comment {get;}

See also


_RemovingfFileInfo_PropertyCommpressedSize

RemovingFileInfo.CompressedSize Property

Gets value of the expression containing the file size before decompression (expressed in bytes)).

[C#]

public int CompressedSize {get; }

See Also


_RemovingfFileInfo_PropertyCompressionRatio

RemovingFileInfo.CompressionRatio Property

Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)

[C#]

public int CompressionRatio {get; }

See Also


_RemovingfFileInfo_PropertyCrc

RemovingFileInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_RemovingfFileInfo_PropertyEncrypted

RemovingFileInfo.Encrypted Property

Gets boolean expression (true if a file is protected with a password, otherwise false) .

[C#]

public bool Encrypted {get;}

See also


_RemovingfFileInfo_PropertyFilename

RemovingFileInfo.Filename Property

Gets string expression containing the name of the file.

[C#]

public string Filename {get;}

See also


_RemovingfFileInfo_PropertyFilenameOnDisk

RemovingFileInfo.FilenameOnDisk Property

Gets string expression containing the path where the file would be stored.

[C#]

public string FilenameOnDisk {get;}

See also


_RemovingfFileInfo_PropertyLastModified

RemovingFileInfo.LastModified Property

Gets value of the expression indicating the day of the last modification.

[C#]

public DateTime LastModified {get; }

See Also


_RemovingfFileInfo_PropertyMethod

RemovingFileInfo.Method Property

Gets enumeration value of type ZipCompressionMethod indicating the compression method.

[C#]

public ZipCompressionMethod Method {get; }

See Also


_RemovingfFileInfo_PropertySize

RemovingFileInfo.Size Property

Gets value of the expression containing the file size before compression (expressed in bytes)

[C#]

public int Size {get;}

See also


_RemovingFile_Delegate

RemovingFileEventHandler Delegate

Represents the method that will handle the RemovingFile event of ZipEvents Class.

[C#]

public delegate void RemovingFileEventHandler (

object sender,

RemovingFileInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the RemovingFileEventHandler delegate declaration.

sender

The source of the event.

e

A RemovingFileInfo object that contains the event data.

See Also


_RemovingfFileInfo_1

RemovingFileInfo Class

RemovingFileInfo contains data related to the RemovingFile event.

For a list of all members of this type, see RemovingFileInfo members.

[C#]

public class RemovingFileInfo;

See Also

RemovingFileInfo members


_SkippingFile_Delegate

SkippingFileEventHandler Delegate

Represents the method that will handle the SkippingFile event of ZipEvents Class.

[C#]

public delegate void SkippingFileEventHandler (

object sender,

SkippingFileInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the SkippingFileEventHandler delegate declaration.

sender

The source of the event.

e

A SkippingFileInfo object that contains the event data.

See Also


_SkippingFile_PropertyAtrtibutes

SkippingFileInfo.Attributes Property

Gets enumeration value of type ZipFileAttributes containing the DOS file attributes

[C#]

public ZipFileAttributes Attributes {get; }

See Also


_SkippingFile_PropertyComment

SkippingFileInfo.Comment Property

Gets string expression containing the file comment.

[C#]

public string Comment {get;}

See also


_SkippingFile_PropertyCompressedSize

SkippingFileInfo.CompressedSize Property

Gets value of the expression containing the file size before decompression (expressed in bytes).

[C#]

public int CompressedSize {get; }

See Also


_SkippingFile_PropertyCompressionRatio

SkippingFileInfo.CompressionRatio Property

Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)

[C#]

public int CompressionRatio {get; }

See Also


_SkippingFile_PropertyCrc

SkippingFileInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_SkippingFile_PropertyEncrypted

SkippingFileInfo.Encrypted Property

Gets boolean expression (true if a file is protected with a password, otherwise false) .

[C#]

public bool Encrypted {get;}

See also


_SkippingFile_PropertyFilename

SkippingFileInfo.Filename Property

Gets string expression containing the name of the file.

[C#]

public string Filename {get;}

See also


_SkippingFile_PropertyFileNameOnDisk

SkippingFileInfo.FilenameOnDisk Property

Gets string expression containing the path where the file would be stored.

[C#]

public string FilenameOnDisk {get;}

See also


_SkippingFile_PropertyLastModified

SkippingFileInfo.LastModified Property

Gets value of the expression indicating the day of the last modification.

[C#]

public DateTime LastModified {get; }

See Also


_SkippingFile_PropertyMethod

SkippingFileInfo.Method Property

Gets enumeration value of type ZipCompressionMethod indicating the compression method.

[C#]

public ZipCompressionMethod Method {get; }

See Also


_SkippingFile_PropertySize

SkippingFileInfo.Size Property

Gets value of the expression containing the file size before compression (expressed in bytes)

[C#]

public int Size {get;}

See also


_SkippingFileInfo_1

SkippingFileInfo Class

SkippingFileInfo contains data related to the SkippingFile event.

For a list of all members of this type, see SkippingFileInfo members.

[C#]

public class SkippingFileInfo;

See Also

SkippingFileInfo members


_SkippingFileInfo_C

SkippingFileInfo Constructor (string , string , string , int , int, int , ZipFileAttributes , unsigned int , DateTime, ZipCompressionMethod , bool )

Initializes a new instance of the SkippingFileInfo class .

[C#]

public SkippingFileInfo (

string Filename,

string Comment,

string FilenameOnDisk,

int Size,

int CompressedSize,

int CompressionRatio,

ZipFileAttributes Attributes,

unsigned int Crc,

DateTime LastModified,

ZipCompressionMethod Method,

bool Encrypted

);

See Also


_SkippingFileInfo_M

SkippingFileInfo Members

Public Constructor

SkippingFileInfo Constructor

Initializes a new instance of the SkippingFileInfo class

Public Properties

FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
FilenameOnDisk | Gets string expression containing the path where the file would be stored
Size | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value of the expression containing the file size before decompression (expressed in bytes)
CompressionRatio | Gets value of the expression containing the compression ratio (If UncompressedSize = 100, and CompressedSize = 30, CompressionRatio = 70)
Attributes | Gets enumeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value of the expression representing the CRC value
LastModified | Gets value of the expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also

SkippingFileInfo


_SpanningMessage_Delegate

SpanningMessageEventHandler Delegate

Represents the method that will handle the SpanningMessage event of ZipEvents Class.

[C#]

public delegate void SpanningMessageEventHandler (

object sender,

SpanningMessageInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the SpanningMessageEventHandler delegate declaration.

sender

The source of the event.

e

A SpanningMessageInfo object that contains the event data.

See Also


_SpanningMessage_PropertyError

SpanningMessageInfo.Error Property

Gets error number.If Error = 0 there is no error; Message carries the string that describes the current change (e.g. "Transferring file: file name ").If Error <> 0 an error occurred; Message carries the string that describes current error .

[C#]

public int Error {get;}

See also


_SpanningMessage_PropertyMessage

SpanningMessageInfo.Message Property

Gets message description.

[C#]

public string Message {get;}

See also


_SpanningMessageInfo_M

SpanningMessageInfo Members

Public Constructor

SpanningMessageInfo Constructor

Initializes a new instance of the SpanningMessageInfo class

Public Properties

Error | Gets error number.If Error = 0 there is no error; Message carries the string that describes the current change (e.g. "Transferring file: file name ").If Error <> 0 an error occurred; Message carries the string that describes current error
Message | Gets message description.

See Also

SpanningMessageInfo class


_SpanningMessageInfo_C

SpanningMessageInfo Constructor (int, string)

Initializes a new instance of the SpanningMessageInfo class .

[C#]

public SpanningMessageInfo (

int Error

string Message,

);

See Also


_SpanningMessageInfo_11

SpanningMessageInfo Class

SpanningMessageInfo contains data related to the SpanningMessage event.

For a list of all members of this type, see SpanningMessageInfo members.

[C#]

public class SpanningMessageInfo;

See Also

SpanningMessageInfo members


_SpanningProcessEnded_Delegate

SpanningProcessEndedEventHandler Delegate

Represents the method that will handle the SpanningProcessEnded event of ZipEvents Class.

[C#]

public delegate void SpanningProcessEndedEventHandler (

object sender,

);

Parameters

The declaration of your event handler must have the same parameters as the SpanningProcessEndedEventHandler delegate declaration.

sender

The source of the event.

See Also


_SpanningProcessStarted_Delegate

SpanningProcessStartedEventHandler Delegate

Represents the method that will handle the SpanningProcessStarted event of ZipEvents Class.

[C#]

public delegate void SpanningProcessStartedEventHandler (

object sender,

);

Parameters

The declaration of your event handler must have the same parameters as the SpanningProcessStartedEventHandler delegate declaration.

sender

The source of the event.

See Also


_TestingFile_Delegate

TestingFileEventHandler Delegate

Represents the method that will handle the TestingFile event of ZipEvents Class.

[C#]

public delegate void TestingFileEventHandler (

object sender,

TestingFileInfo e

);

Parameters

The declaration of your event handler must have the same parameters as the TestingFileEventHandler delegate declaration.

sender

The source of the event.

e

A TestingFileInfo object that contains the event data.

See Also


_TestingFile_PropertyAttributes

TestingFileInfo.Attributes Property

Gets enumeration value of type ZipFileAttributes containing the DOS file attributes

[C#]

public ZipFileAttributes Attributes {get; }

See Also


_TestingFile_PropertyComment

TestingFileInfo.Comment Property

Gets string expression containing the file comment.

[C#]

public string Comment {get;}

See also


_TestingFile_PropertyCompressedSize

TestingFileInfo.CompressedSize Property

Gets value of the expression containing the file size before decompression (expressed in bytes).

[C#]

public int CompressedSize {get; }

See Also


_TestingFile_PropertyCrc

TestingFileInfo.Crc Property

Gets value of the expression representing the CRC value.

[C#]

public unsigned int Crc {get; }

See Also


_TestingFile_PropertyEncrypted

TestingFileInfo.Encrypted Property

Gets boolean expression (true if a file is protected with a password, otherwise false) .

[C#]

public bool Encrypted {get;}

See also


_TestingFile_PropertyFileName

TestingFileInfo.Filename Property

Gets string expression containing the name of the file.

[C#]

public string Filename {get;}

See also


_TestingFile_PropertyLastModified

TestingFileInfo.LastModified Property

Gets value of the expression indicating the day of the last modification.

[C#]

public DateTime LastModified {get; }

See Also


_TestingFile_PropertyMethod

TestingFileInfo.Method Property

Gets enumeration value of type ZipCompressionMethod indicating the compression method.

[C#]

public ZipCompressionMethod Method {get; }

See Also


_TestingFile_PropertySize

TestingFileInfo.Size Property

Gets value of the expression containing the file size before compression (expressed in bytes).

[C#]

public int Size {get;}

See also


_TestingFileInfo_1

TestingFileInfo Class

TestingFileInfo contains data related to the TestingFile event.

For a list of all members of this type, see TestingFileInfo members.

[C#]

public class TestingFileInfo;

See Also

TestingFileInfo members


_TestingFileInfo_C

TestingFileInfo Constructor ( string , string , int , int , ZipFileAttributes , unsigned int , DateTime , ZipCompressionMethod , bool )

Initializes a new instance of the TestingFileInfo class .

[C#]

public TestingFileInfo (

string Filename,

string Comment,

int Size,

int CompressedSize,

ZipFileAttributes Attributes,

unsigned int Crc,

DateTime LastModified,

ZipCompressionMethod Method,

bool Encrypted

);

See Also


_TestingFileInfo_M

TestingFileInfo Members

Public Constructor

TestingFileInfo Constructor

Initializes a new instance of the TestingFileInfo class

Public Properties

FileName | Gets string expression containing the name of the file.
Comment | Gets string expression containing the file comment
Size | Gets value of the expression containing the file size before compression (expressed in bytes)
CompressedSize | Gets value of the expression containing the file size before decompression (expressed in bytes)
Attributes | Gets enumeration value of type ZipFileAttributes containing the DOS file attributes
Crc | Gets value of the expression representing the CRC value
LastModified | Gets value of the expression indicating the day of the last modification
Method | Gets enumeration value of type ZipCompressionMethod indicating the compression method
Encrypted | Gets boolean expression (true if a file is protected with a password, otherwise false)

See Also

TestingFileInfo Class


_ZipException_members

ZipException Members

Public Constructors

ZipException Constructor

Initializes a new instance of the ZipException class.

Public Properties

ErrorID

Gets Polar Zip exception error ID.

See Also

ZipException class


_ZipFileFilter_Members

ZipFileFilter Members

Public Constructor

ZipFileFilter constructor

Initializes a new instance of the ZipFileFilter class and receives files-to-include mask. This mask is directly passed to the FilesToIncludeMask Property.

Public Properties

ExcludeFileAttributes | This property lets you limit the processing of files to only those files that do not have specific file attributes.
ExcludeFromCompression | Specifies suffixes of files that are not going to be compressed during compression process.
FilesToExcludeMask | This property lets you exclude specific files or folders from the list of files to be processed and provided to the FilesToIncludeMask property.
FilesToIncludeMask | This property is used to provide a list of files or folders to be processed by the Polar Zip control.
IncludeHiddenFiles | Defines whether hidden files will be added to the archive.
RecurseSubDirectories | If set to true, all files that are located in the subdirectories of the source directory will be included into the archive.
RequireFileAttributes | This property lets you limit the processing of files to only those files that have specific file attributes.
SkipExistingFiles | This property allows you to only process files that do not already exist in the destination unzipping folder or when zipping, the destination zip file.
SkipFilesAffterDate | Gets or sets the upper limitation date of the files that will be zipped. File date component will checked is the last modification date.
SkipFilesBeforeDate | Gets or sets the lower limitation date of the files that will be zipped. File date component will checked is the last modification date.
SkipFilesIfOlder | Setting this property to true will indicate that all already existing files will be overwritten only if they are older.
SkipFilesLargerThan | This property lets you limit the processing of files to only those that are smaller than or equal to a specified file size.
SkipFilesSmallerThan | This property lets you limit the processing of files to only those that are larger than or equal to a specified file size.
SkipFilesThatDontExist | This property allows you to only process files that already exist in the destination unzipping folder or when zipping, the destination zip file.

Public Methods

AddFilesToExcludeMask | Appends mask to the FilesToExcludeMask property by placing '|' character between old and new mask .
AddFilesToIncludeMask | Appends mask to the FilesToIncludeMask property by placing '|' character between old and new mask.

See Also

ZipFileFilter class