commit | 812a44ebd0a34ba2985f7f10c451fd210d5bab15 | [log] [tgz] |
---|---|---|
author | Olivier Mengué <olivier.mengue@gmail.com> | Thu Mar 06 19:44:22 2025 +0100 |
committer | Gopher Robot <gobot@golang.org> | Fri Mar 07 11:31:30 2025 -0800 |
tree | 8d68ea3cb56fc53ca08307e81756510e9cda03cf | |
parent | fe9b292b11355af6b5f6e1d9247b88fa134657ed [diff] |
archive/zip: preallocate fileList size for Reader.Open When building the index of file entries for Reader.Open (when the Reader is used as an io/fs.FS), reduce reallocations by pre-allocating the count of entries based on the count of file entries. Change-Id: I05048337cb5e752054b3e984a8a5ec5199c4589b Reviewed-on: https://go-review.googlesource.com/c/go/+/655476 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.