]> Cypherpunks.ru repositories - gostls13.git/commit
archive/zip: add File.OpenRaw, Writer.CreateRaw, Writer.Copy
authorEddie Scholtz <escholtz@google.com>
Wed, 21 Apr 2021 17:11:02 +0000 (11:11 -0600)
committerIan Lance Taylor <iant@golang.org>
Mon, 3 May 2021 21:11:47 +0000 (21:11 +0000)
commitddb648fdf6c21e7e56a2252df3e3913a212ca4ab
tree3f57e8eaf713c32a5549f04d14ffee8364a40bc7
parent9f347035ef46c5f275fedf23893e0883b3b24035
archive/zip: add File.OpenRaw, Writer.CreateRaw, Writer.Copy

These new methods provide support for cases where performance is a
primary concern. For example, copying files from an existing zip to a
new zip without incurring the decompression and compression overhead.
Using an optimized, external compression method and writing the output
to a zip archive. And compressing file contents in parallel and then
sequentially writing the compressed bytes to a zip archive.

TestWriterCopy is copied verbatim from https://github.com/rsc/zipmerge

Fixes #34974

Change-Id: Iade5bc245ba34cdbb86364bf59f79f38bb9e2eb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/312310
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
src/archive/zip/reader.go
src/archive/zip/reader_test.go
src/archive/zip/struct.go
src/archive/zip/writer.go
src/archive/zip/writer_test.go