ZipLibrary 1.0.89

There is a newer version of this package available.
See the version list below for details.
dotnet add package ZipLibrary --version 1.0.89
                    
NuGet\Install-Package ZipLibrary -Version 1.0.89
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZipLibrary" Version="1.0.89" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZipLibrary" Version="1.0.89" />
                    
Directory.Packages.props
<PackageReference Include="ZipLibrary" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZipLibrary --version 1.0.89
                    
#r "nuget: ZipLibrary, 1.0.89"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZipLibrary@1.0.89
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZipLibrary&version=1.0.89
                    
Install as a Cake Addin
#tool nuget:?package=ZipLibrary&version=1.0.89
                    
Install as a Cake Tool

ZipLibrary — Moteur ZIP bas niveau en C#

Implémentation from-scratch du format ZIP (PKWARE APPNOTE.TXT) en C# / .NET 8, sans dépendance externe. Conçue pour comprendre et maîtriser chaque octet du format.


Architecture

ZipLibrary/
├── Core/
│   ├── ZipConstants.cs       Signatures, flags, constantes de la spec
│   ├── ZipStructures.cs      LocalFileHeader, CentralDirectoryRecord, EOCD
│   ├── Crc32.cs              Calcul CRC-32 (polynôme 0xEDB88320)
│   ├── ZipCrypto.cs          Chiffrement PKWARE traditionnel (3 clés CRC)
│   └── AesCrypto.cs          AES-256 CTR + PBKDF2 + HMAC-SHA1 (WinZip AES)
├── Compression/
│   ├── ICompressor.cs        Interface générique
│   ├── StoredCompressor.cs   MethodId=0 : copie brute
│   └── DeflateCompressor.cs  MethodId=8 : DEFLATE (RFC 1951)
├── IO/
│   └── LimitedStream.cs      Stream borné (évite le débordement sur le CD)
├── ZipEntryInfo.cs           Modèle public d'une entrée
├── ZipOptions.cs             Configuration (compression, chiffrement, progression)
├── ZipWriter.cs              Moteur d'écriture bas niveau
├── ZipReader.cs              Moteur de lecture bas niveau
└── ZipArchive.cs             API publique haut niveau

Fonctionnalités

Fonctionnalité Détail
Compression DEFLATE (niveau 1–9) + Stored (niveau 0)
Chiffrement ZipCrypto (PKWARE) et AES-256 CTR (WinZip AES extension)
Intégrité CRC-32 calculé et vérifié à l'extraction
Sécurité Protection Zip Slip (path traversal)
Structure Local Header + Central Directory + EOCD conformes APPNOTE
Encodage Noms de fichiers en UTF-8 (flag 0x0800)
Progression IProgress<double> sur compression et extraction

Utilisation rapide

// Créer
ZipArchive.Create("archive.zip", new[] { "file1.txt", "file2.pdf" });

// Créer avec AES-256
ZipArchive.Create("secure.zip", new[] { "secret.docx" }, new ZipOptions {
    Password   = "MonMotDePasse!",
    Encryption = ZipEncryption.Aes256
});

// Extraire
ZipArchive.ExtractToDirectory("secure.zip", "./output",
    new ZipOptions { Password = "MonMotDePasse!" });

// Lister
foreach (var e in ZipArchive.List("archive.zip"))
    Console.WriteLine(e);

Spécification de référence


Roadmap

  • ZIP64 (fichiers > 4 Go, extra field 0x0001)
  • DEFLATE from-scratch (LZ77 + Huffman canonique sans System.IO.Compression)
  • Streaming writer (Data Descriptor 0x0008 pour CRC/tailles en fin)
  • BZip2 (MethodId=12) et LZMA (MethodId=14)
  • Support multi-disk
  • Tests unitaires (compatibilité 7-Zip, WinZip, .NET ZipArchive)
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.91 70 5/4/2026
1.0.89 66 5/2/2026
1.0.88 59 5/2/2026