Skip to content

Latest commit

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

zip.zig

A Zig library to work with zip files.

This is an experimental library and not meant for production use. The only place where this has been used is zigverm.

Adding it to your project

  • Add zip.zig to your dependencies
zig fetch --save https://github.com/AMythicDev/zip.zig/archive/refs/tags/v[VERSION].tar.gz
  • In your build.zig:
pubfnbuild(b: *std.Build) !void {
// Get the dependency into your build.zigconstzip=b.dependency("zip", .{});
// Add import to all your compile targetstest_exe.root_module.addImport("zip", zip.module("zip"));

Basic Usage

Open a zip file and list its members

constfile=trystd.fs.File.openFile("myzip.zip", .{});
constzipfile=tryZipArchive.openFromStreamSource(alloc, @constCast(&std.io.StreamSource{ .file=file }));
varm_iter=zipfile.members.iterator();
while (m_iter.next()) |i| {
std.debug.print("{s}", i.key_ptr.*);
}

License

The project is licensed under Apache 2.0 License.

About

Library for handling zip files in Zig

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages