zip append

Skip to first unread message

roger peppe

Jan 27, 2016, 7:21:54 AM1/27/16
to golang-dev
As part of some other work, I had the need to append
to a zip archive, so I forked archive/zip and added
zip.Reader.Append [1]. It wasn't that much code [2],
and I don't like forking stdlib packages, so...
might this might be a reasonable addition to the
stdlib archive/zip package?


Russ Cox

Jan 27, 2016, 8:19:54 AM1/27/16
to roger peppe, golang-dev
Sure, but please wait for Go 1.7. Also that's a surprisingly limited API. Normally I would expect you'd want to actually replace files. And what about updating the end-of-zip-file table of contents? How does that happen?


You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Benny Siegert

Jan 27, 2016, 5:24:48 PM1/27/16
to Russ Cox, roger peppe, golang-dev
I have not looked at the code in detail, but usually, when you append to a zip file, you write a new TOC that replaces the older one in the middle.
Reply all
Reply to author
0 new messages