Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: archive/zip: appending files to archive #64647

Closed
STARRY-S opened this issue Dec 11, 2023 · 2 comments
Closed

proposal: archive/zip: appending files to archive #64647

STARRY-S opened this issue Dec 11, 2023 · 2 comments
Labels
Milestone

Comments

@STARRY-S
Copy link

Proposal Details

The original issue was created a few years ago: #15626 and it was declined science it needs an interface like io.ReadWriterAt and a low number of potential users.

I recently encountered the need to append new files to large zip archives. Can we retake this issue and consider adding appending files into the zip archive feature to the official archive/zip library?

Although there is no interface like io.ReadWriterAt, However, I think the Appender can still be implemented based on the interface io.ReadWriteSeeker.

@gopherbot gopherbot added this to the Proposal milestone Dec 11, 2023
@seankhliao
Copy link
Member

It looks like it was primarily declined for low usage, and we want to see an implementation outside std first. Has that happened?

@STARRY-S
Copy link
Author

It looks like it was primarily declined for low usage, and we want to see an implementation outside std first. Has that happened?

@seankhliao Thanks for your quick reply, sorry I did not find other implementations outside std, so I implemented this appender based on the source code of Go version v1.21.3 and just for use in my project.
I don't think this is the best way to address it, and I hope this feature will be supported in the Go standard library and allow more users to use it and maintain it by official developers, so I opened this issue to ask if this feature can be implemented or not.

I can draft a pull request of my changes if this feature is considered to be added to the std library.
Or just as the previous issue said, we can still wait to see if third-party libraries implement it, but during this period it is very likely that some potential users may be affected because the standard library does not support this feature.

In my point of view, the zip format is designed to allow the easy appending of new files and random access. Users may use the zip format just because it supports these features. Otherwise, users can just use the tarball formats such as tar.gz.

@seankhliao seankhliao changed the title proposal: archive/zip: Consider adding appending files support for zip archive file format. proposal: archive/zip: appending files to archive Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

3 participants