ZipZap 1.0.3
dotnet add package ZipZap --version 1.0.3
NuGet\Install-Package ZipZap -Version 1.0.3
<PackageReference Include="ZipZap" Version="1.0.3" />
<PackageVersion Include="ZipZap" Version="1.0.3" />
<PackageReference Include="ZipZap" />
paket add ZipZap --version 1.0.3
#r "nuget: ZipZap, 1.0.3"
#:package ZipZap@1.0.3
#addin nuget:?package=ZipZap&version=1.0.3
#tool nuget:?package=ZipZap&version=1.0.3
ZipZap - The Zippity Zappity Compression Library 🧙♂️✨
Welcome to ZipZap - your one-stop shop for all your zipping and unzipping needs! Whether you're a developer trying to tidy up files, save space, or just love the idea of packaging things into tiny little boxes, ZipZap has got you covered.
Why Choose ZipZap? 🤔
- No Bloat, Just Zip: Simple to use, no unnecessary dependencies.
- Speed and Precision: Leverage .NET's built-in
System.IO.Compressionwith a streamlined API. - Friendly to Newbies: Default options make it easy to get started.
- Delete with a Bang: Optionally delete originals after compressing or decompressing - like a digital magic trick.
Getting Started 🏁
Install via NuGet:
dotnet add package ZipZap
Import the namespace into your project:
using YourNamespace.ZipZap;
Features 🚀
1. Compressing Files and Folders
Need to squish a single file or an entire folder? We've got you covered. Here's how:
// Compress a single file
ZipZap.Compress(
sourcePath: "example.txt",
zipFilePath: "example.zip"
);
// Compress an entire folder
ZipZap.Compress(
sourcePath: "MyFolder",
zipFilePath: "MyFolder.zip",
overwrite: true
);
Advanced Options:
overwrite: Overwrite the existing zip file? Default:false.deleteOriginal: Delete the original file/folder after zipping? Default:false.compressionLevel: Choose fromOptimal,Fastest, orNoCompression.
ZipZap.Compress(
sourcePath: "example.txt",
zipFilePath: "example.zip",
overwrite: true,
deleteOriginal: true,
compressionLevel: ZipZap.CompressionLevel.Fastest
);
2. Decompressing Files
Open that zipped treasure chest!
// Decompress a zip file
ZipZap.Decompress(
zipFilePath: "example.zip",
destinationFolderPath: "ExtractedFolder"
);
// Overwrite existing files and delete the zip after extraction
ZipZap.Decompress(
zipFilePath: "example.zip",
destinationFolderPath: "ExtractedFolder",
overwrite: true,
deleteZipFile: true
);
Behind the Scenes 🕵️♀️
- File Validation: If a file or folder doesn’t exist, ZipZap will let you know (and won't crash the party).
- Recursive Compression: Folders are zipped with all their subfolders and files.
- Safe Defaults: It won’t overwrite files unless you explicitly allow it.
Use Cases 🎉
- Backups: Quickly compress and store important files.
- Sharing is Caring: Send multiple files in one tidy package.
- Digital Spring Cleaning: Compress, delete, and free up space!
FAQ 🧐
Q: What if I try to compress something that doesn’t exist?
A: Don't worry. ZipZap won’t let you compress the void. It will kindly inform you that your source path doesn’t exist.
Q: What happens if the destination zip already exists?
A: Unless you set overwrite to true, ZipZap will politely back off and not overwrite your precious file.
Q: Does it support crazy nested folders?
A: Absolutely! Compress away without fear of losing your folder structures.
Acknowledgments
This library uses the amazing System.IO.Compression under the hood. All we did was sprinkle some magic on top to make it easier to use.
Author
Developed by Håvard Brækken.
Contributing
Feel free to submit issues or create pull requests if you have suggestions or improvements!
License
This project is licensed under the MIT License. See the LICENSE file for more details.
So go ahead, ZipZap your way to file-compression happiness. Happy zipping! ✨
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.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.