devexpress-office-file-api-zip

Create, read, and extract ZIP archives in .NET using the DevExpress Compression API.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/AleksaRistic216/dotnet-playground --skill devexpress-office-file-api-zip-aleksaristic216
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: devexpress-office-file-api-zip
Source: https://github.com/AleksaRistic216/dotnet-playground/tree/main/.github/skills/office-file-api/devexpress-office-file-api-zip
Command: npx skills add https://github.com/AleksaRistic216/dotnet-playground --skill devexpress-office-file-api-zip-aleksaristic216

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires DevExpress.Document.Processor, and includes references (resource) components.

What problem does it solve? Developers building .NET applications often need to programmatically create, read, and extract ZIP archives without external dependencies, while handling encryption, file conflicts, cancellation, and in-memory data sources correctly. ## Core Features & Use Cases - Archive Creation and Extraction: Build ZIP files from directories, file lists, streams, byte arrays, or text strings, and extract existing archives to disk with conflict resolution callbacks. - Encryption and Security: Password-protect entries with AES-256 or ZipCrypto, and apply SecureZipPolicy resource limits when processing untrusted archives. - Event-Driven Control: Filter items during archiving, track progress with cancellation support, and handle per-item errors without aborting the whole operation. - Use Case: An ASP.NET Core service needs to bundle user-uploaded documents into a password-protected ZIP for download, skipping files older than a cutoff date and logging any items that fail to compress. ## Quick Start Ask the AI to create a .NET console app that uses the DevExpress Zip API to archive a directory into a password-protected ZIP file and then extract it to an output folder.

Frequently Asked Questions about devexpress-office-file-api-zip

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a ZIP file in C# with DevExpress?

Create a ZipArchive instance, call AddDirectory or AddFile to add content, then call Save with the output path. Install the DevExpress.Document.Processor NuGet package and import the DevExpress.Compression namespace first.

How do I password-protect a ZIP archive in .NET?

Set the ZipArchive Password property and choose an EncryptionType before saving. Use EncryptionType.Aes256 for strong encryption or EncryptionType.PkZip for legacy ZipCrypto compatibility.

Does the DevExpress Zip API support .NET Framework?

Yes, the same ZipArchive API works on .NET 6/7/8+ and .NET Framework 4.6.2 or later. .NET Framework projects can install the NuGet package or reference DevExpress.Docs.v26.1.dll directly.

Why can't I save a ZIP to the same file I opened with ZipArchive.Read?

ZipArchive.Read locks the source file, so Save cannot overwrite it and throws InvalidOperationException. Copy the file to a MemoryStream first, read from the stream, then save back to the original path.

How do I skip or filter files when creating a ZIP archive?

Subscribe to the ItemAdding event and set args.Action to ZipItemAddingAction.Cancel for items you want to skip. You can filter by file extension, date, or any custom condition before the item is added.

How do I handle file conflicts when extracting a ZIP archive?

Set OptionsBehavior.AllowFileOverwrite to AllowFileOverwriteMode.Custom and handle the AllowFileOverwrite event. Set e.Cancel to true to skip overwriting, for example when the existing file on disk is newer than the archive entry.