devexpress/agent-skills/devexpress-office-file-api-zip
Claude Code and agent skill by devexpress/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Build .NET applications with the DevExpress Zip Compression and Archive API for creating, reading, and extracting ZIP archives programmatically. Use when creating zip files, extracting archives, compressing files or streams, adding password protection to archives, compressing byte arrays or .NET streams, or handling file conflicts during extraction. Also use when someone mentions "DevExpress Zip", "DevExpress Compression", "ZipArchive", "DevExpress.Compression", "create zip C#", "extract zip .NET", "compress stream", or asks about ZIP/archive operations with DevExpress. Covers both .NET and .NET Framework.
Install
npx vskill@latest install devexpress/agent-skills/devexpress-office-file-api-zipSKILL.md
DevExpress Zip Compression and Archive API
The Zip Compression and Archive API is a non-visual .NET library for creating, reading, and extracting ZIP archives programmatically — without any external dependencies. It supports archiving files, directories, streams, byte arrays, and text; password-protecting entries with AES-256 or ZipCrypto; filtering content during archiving; cancellation via progress callbacks; and conflict resolution during extraction.
When to Use This Skill
Use this skill when you need to:
- Create a ZIP archive from a directory (recursively) or from a list of files
- Add individual files to a new or existing ZIP archive
- Filter files during archiving using the
ItemAddingevent - Archive a .NET
Streamor abyte[]directly (without writing to disk first) - Archive a text string as a named entry in a ZIP file
- Password-protect archive entries using AES-256 (
EncryptionType.Aes256) or ZipCrypto (EncryptionType.PkZip) - Add comments to individual archive entries
- Extract (unzip) an archive to a directory
- Resolve file conflicts during extraction with a callback (
AllowFileOverwriteevent) - Cancel a long-running archiving operation via the
Progressevent - Handle archiving errors without aborting the entire operation
- Add files to an existing archive without losing its current contents
Prerequisites & Installation
NuGet Packages
| Package | Purpose | |
|---|---|---|
DevExpress.Document.Processor | Core ZIP compression and archive functionality |
.NET (8/9/10+)
.NET Framework (4.6.2+)
Or add a reference to DevExpress.Docs.v26.1.dll directly.
Important: All DevExpress packages in a project must share the same version number. A valid DevExpress license is required.
Package Versions
Unless the user explicitly requests a specific version, always target the latest DevExpress release (v26.1 at the time of writing). dotnet add package <PackageName> without --version installs the latest stable version — prefer this form. Never pin an older version in project files, Dockerfiles, or CI/CD pipelines unless the user asks for it. This is especially important in integration scenarios (Docker, cloud deployments). All DevExpress.* packages in a project must share the same version.
Before You Start — Ask the Developer
If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's AskUserQuestion tool or GitHub Copilot's askQuestions tool. If no such tool is available, ask the questions directly in the chat response before generating code.
Before generating code, ask these questions to avoid rework:
General Questions
- Target framework: Are you using .NET 8+ or .NET Framework 4.x?
- New or existing project?: Creating new or adding to existing?
- Hosting model: Console app, ASP.NET Core, Blazor, MAUI, or something else?
Zip-Specific Questions
- Operation? Create archive / extract archive / compress stream or byte array / add to existing archive
- Source? Directory / specific files with filtering / in-memory stream or byte array
- Special requirements? Password protection / file conflict resolution / cancellation / comments
Rule: If the developer's answer is ambiguous or missing, ask before generating code. Do not guess.
Component Overview
The Zip Compression and Archive API provides:
- Archive creation: Create ZIP archives from directories, file lists, streams, byte arrays, or text (
ZipArchive,ZipFileItem,ZipDirectoryItem,ZipStreamItem,ZipByteArrayItem,ZipTextItem) - Archive reading and extraction: Open existing ZIP files and extract items to disk (
ZipArchive.Read(),ZipItem.Extract()) - Password protection: Encrypt entries with AES-256 or ZipCrypto (
ZipArchive.Password,ZipArchive.EncryptionType,EncryptionType) - Event-driven control: Filter items, track progress, resolve conflicts, handle errors (
ItemAdding,Progress,AllowFileOverwrite,Errorevents) - In-place update: Update an existing archive without losing its contents (
ZipArchive.Read()+AddFile()/UpdateFile())
Core Entry Point
Documentation & Navigation Guide
Getting Started
Refer to references/getting-started.md
When you need to:
- Set up the Zip API for the first time (NuGet, .NET Framework references)
- Create your first ZIP archive from a directory
- Extract an archive to a folder
- See complete compilable examples for both operations
- Apply
SecureZipPolicy.ResourceLimitsto protect against untrusted ZIP files (v26.1+)
Quick Start Example
A complete minimal example — archive two in-memory text files, then extract the result:
What This Does
Creates a ZIP file containing two text entries generated entirely in memory, then extracts both files to the extracted/ subdirectory. No intermediate files are needed for the source content.
Key Properties & API Surface
ZipArchive
| Property/Method | Type | Description | |
|---|---|---|---|
new ZipArchive() | — | Creates an empty archive ready to receive items | |
ZipArchive.Read(path) | ZipArchive | Opens an existing ZIP file for reading/extraction | |
ZipArchive.Read(stream, encoding, leaveOpen) | ZipArchive | Opens a ZIP from a stream (use to add to existing archive) | |
AddDirectory(path) | ZipDirectoryItem | Recursively adds all files in a directory | |
AddFile(filePath, folderInZip) | ZipFileItem | Adds a single file to a specified folder in the archive | |
AddFiles(paths) | void | Adds a collection of file paths at once | |
AddStream(name, stream) | ZipStreamItem | Adds a .NET stream as a named entry | |
AddByteArray(name, bytes) | ZipByteArrayItem | Adds a byte array as a named entry | |
AddText(name, text) | ZipTextItem | Adds a UTF-8 text string as a named file entry | |
Save(filePath) | void | Compresses and saves the archive to a file | |
Save(stream) | void | Compresses and saves the archive to a stream | |
Password | string | Sets the password for encryption | |
EncryptionType | EncryptionType | Aes256 (strong) or PkZip (ZipCrypto, legacy) | |
OptionsBehavior | ZipArchiveOptionsBehavior | Behavior settings (e.g., AllowFileOverwrite mode) | |
ItemAdding | event | Fires before each item is added; set Action to skip/stop | |
Progress | event | Fires during save; set CanContinue = false to cancel | |
AllowFileOverwrite | event | Fires on extraction conflict; set Cancel = true to skip | |
Error | event | Fires on item-level error; set CanContinue = false to abort |
ZipItem (base for all item types)
| Property/Method | Type | Description | |
|---|---|---|---|
Name | string | Entry name within the archive | |
Comment | string | Per-entry comment string | |
LastWriteTime | DateTime | Last modified timestamp | |
CreationTime | DateTime | Creation timestamp | |
Extract(targetDir) | void | Extracts this item to the specified directory |
EncryptionType enum
| Value | Description | |
|---|---|---|
EncryptionType.Aes256 | AES-256 encryption (strong, recommended) | |
EncryptionType.PkZip | Traditional ZipCrypto (legacy compatibility) |
Common Patterns
Archive a Directory
Archive Selected Files (filtered by extension)
Add Files via ItemAdding Event (conditional filtering)
Add File to an Existing Archive
Password-Protect an Archive (AES-256)
Compress a .NET Stream
Compress a Byte Array
Add a Text String Directly
Add Per-Entry Comments
Cancel Archiving via Progress Event
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/dx-office-file-api/skills/devexpress-office-file-api-zip/SKILL.md
Popularity
- Repository stars
- 52
- Repository forks
- 8
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/devexpress/agent-skills/devexpress-office-file-api-zip)