Skip to content
Commit 9538f419 authored by François Degros's avatar François Degros Committed by Copybara-Service
Browse files

[zip] Add struct UnzipOptions

Added struct UnzipOptions to pass optional arguments to the Unzip
functions (including the decryption password, if needed.)

Removed function UnzipWithFilterCallback(). Use Unzip() + UnzipOptions
instead.

Renamed function UnzipWithFilterAndWriters() to simply Unzip(), and pass
to it an UnzipOptions struct too.

Added tests:
ZipTest.UnzipEncryptedWithRightPassword
ZipTest.UnzipEncryptedWithWrongPassword
ZipTest.UnzipEncryptedWithNoPassword

BUG=chromium:1296838, chromium:953256
TEST=autoninja -C out/Default zlib_unittests && out/Default/zlib_unittests
TEST=autoninja -C out/Default components_unittests && out/Default/components_unittests --gtest_filter='UnzipTest.*'

Change-Id: I8a29f57f2cec3007e419a94dd6a4d8ec83c8a59c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3463278


Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: François Degros <fdegros@chromium.org>
Cr-Commit-Position: refs/heads/main@{#971432}
NOKEYCHECK=True
GitOrigin-RevId: 68766ecf2214aca9bd122c00ece1f7cfaba168e5
parent 4e87a80d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment