Declaration
Archive_Writer :: struct {
data: *void; write_proc: Archive_Write_Proc;}A byte sink for write_archive and copy_entry. It owns nothing and works on every target, wasm
included. To write to a file or socket, point data at it and forward to its own write, as
forward does for an Extensions/Io writer.
forward :: (data: *void, bytes: [] u8) -> bool {
_, error := Io.write((cast(*Io.Writer) data).*, bytes);
return error == .NONE;
}
io_writer := Io.writer_of(*file);
error := write_archive(Archive_Writer.{ data = *io_writer, write_proc = forward }, items, .ZIP);