Skip to content
Peterson Fernandes edited this page Sep 10, 2026 · 4 revisions

ZARSharp Documentation

Welcome to the ZARSharp documentation. This guide covers everything you need to know about using ZARSharp for archive creation, zstd compression, and batch processing.

Table of Contents

Getting Started

Core Concepts

  • ZAR-Format — Archive format specification, structure, and design decisions
  • Zstd-Compression — Compression levels, strategies, and tuning guide
  • Seekable-Format — Seekable zstd framing (Foot + Head tables)

API Documentation

  • API-Reference — Complete library API for all public types and methods
  • Pipeline — Batch operations, progress reporting, and collision handling

Advanced Topics

  • Benchmarks — Performance characteristics and optimization tips
  • FAQ — Frequently asked questions and troubleshooting

Overview

ZARSharp is a pure-C# port of the ZArchive 0.1.2 library. It provides:

  1. Archive format — Directory-tree archives with per-block zstd compression (64 KiB blocks)
  2. zstd codec — Complete RFC 8878 encoder and decoder (levels 1–22, all 9 strategies)
  3. Seekable format — zeekstd-compatible seekable zstd framing
  4. Pipeline — Batch pack/extract with progress, pause, cancellation, and collision policies
  5. CLI toolzar command matching zarchive.exe behavior

Key Properties

Property Value
Target frameworks net8.0, net9.0, net10.0
Runtime dependencies None (BCL only)
Unsafe code None in the zstd path
Trimmable Yes
AOT compatible Yes
License MIT

Byte-Identity Guarantee

ZARSharp produces byte-identical output to:

  • The original C++ zarchive.exe (ZArchive 0.1.2)
  • libzstd 1.5.7 (frozen reference)
  • zeekstd (seekable format)

This is verified by over 3800 tests including parity validation against native tools.


Quick Links

Topic Description
Getting-Started#installation How to install ZARSharp
Getting-Started#packing-a-directory Create your first archive
Getting-Started#extracting-an-archive Extract archive contents
CLI-Reference#usage Command-line tool reference
Zstd-Compression#compression-levels Choosing the right level
Pipeline#basic-usage Batch operations
API-Reference#error-handling Exception types and handling

Clone this wiki locally