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.
- Add
zip.zigto 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"));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.*);
}The project is licensed under Apache 2.0 License.