Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active April 18, 2025 12:52
Show Gist options
  • Save aspose-com-gists/d36442ed0c54ec0f90e04486f742d742 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/d36442ed0c54ec0f90e04486f742d742 to your computer and use it in GitHub Desktop.
Uncompress Z File in C#
string dataDir = "Desktop";
//Extracts the archive and copies extracted content to file stream.
using (var archive = new ZArchive(dataDir + "archive.z"))
{
// Create a FileOutputStream to write the extracted content to the output file.
using (var extracted = File.Create(dataDir + "alice29_out.txt"))
{
// Extract the contents of the archive to the output file by calling the Extract method.
archive.Extract(extracted);
}
}
Console.WriteLine("Successfully Opened Z Archive");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment