Proposal Details
The archive/zip library allows uncompressed files to be saved in a zip file. This allows, for example, another zip file to be stored uncompressed in a zip file. When reading the file, it is now possible to open this ZIP file via File.OpenRaw(). However, as only the type io.Reader is returned here, it cannot be opened with zip.NewReader(). Internally, File.OpenRaw() already uses the ReaderAt type so that the returned io.Reader can be casted to io.ReaderAt. However, as this is not sustainable, it would be better if io.ReaderAt could be returned directly.
Example: https://go.dev/play/p/DlP3vqHtHY3
Proposal Details
The archive/zip library allows uncompressed files to be saved in a zip file. This allows, for example, another zip file to be stored uncompressed in a zip file. When reading the file, it is now possible to open this ZIP file via File.OpenRaw(). However, as only the type io.Reader is returned here, it cannot be opened with zip.NewReader(). Internally, File.OpenRaw() already uses the ReaderAt type so that the returned io.Reader can be casted to io.ReaderAt. However, as this is not sustainable, it would be better if io.ReaderAt could be returned directly.
Example: https://go.dev/play/p/DlP3vqHtHY3