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

Read comp_size, decomp_size and local_header_ofs for zip64 if extra fields exist #324

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

larryliu0820
Copy link

@larryliu0820 larryliu0820 commented Nov 7, 2024

As titled. For a zip64 archive file, comp_size, decomp_size and local_header_ofs are not stored in p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, instead they are being stored in pExtra_data.

Here we need to read uint64 for comp_size, decomp_size and local_header_ofs. Good that they are already of that type.

Reference: https://en.wikipedia.org/wiki/ZIP_(file_format)#ZIP64

As titled. For a zip64 archive file, `comp_size` and `decomp_size` are not stored in `p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS`, instead they are being stored in `pExtra_data`.

Here we need to read `uint64` for `comp_size` and `decomp_size`. Good that they are already of that type.
@larryliu0820 larryliu0820 changed the title Read comp_size and decomp_size for zip64 Read comp_size, decomp_size and local_header_ofs for zip64 if extra fields exist Nov 7, 2024
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 400e66908589b0ff6fcb401e9edaf392d450bba1
Pull Request resolved: #139985
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: ed404f7404a065b215bbfca28824fbdf758181fc
Pull Request resolved: #139985
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
…d patch for zip64"

Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
…d patch for zip64"

Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D65586230](https://our.internmc.facebook.com/intern/diff/D65586230)

[ghstack-poisoned]
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D65586230](https://our.internmc.facebook.com/intern/diff/D65586230)

[ghstack-poisoned]
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan: Rely on unit test

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 4501669becb67e3c2ac9b9a3b954dd21ccff847c
Pull Request resolved: #139985
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 7, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 8, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 8, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 8, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Reviewed By: mikaylagawarecki, angelayi

Differential Revision: D65586230
larryliu0820 added a commit to pytorch/pytorch that referenced this pull request Nov 8, 2024
Summary:
Pull Request resolved: #140041

Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Reviewed By: mikaylagawarecki, angelayi

Differential Revision: D65586230
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Nov 9, 2024
Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* #79636 patches internal BUCK and bazel build
* #138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230

Pull Request resolved: #140041
Approved by: https://github.com/mikaylagawarecki
atalman pushed a commit to atalman/pytorch that referenced this pull request Nov 11, 2024
…140041)

Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* pytorch#79636 patches internal BUCK and bazel build
* pytorch#138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230

Pull Request resolved: pytorch#140041
Approved by: https://github.com/mikaylagawarecki
zero000064 pushed a commit to zero000064/pytorch that referenced this pull request Nov 14, 2024
…140041)

Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* pytorch#79636 patches internal BUCK and bazel build
* pytorch#138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230

Pull Request resolved: pytorch#140041
Approved by: https://github.com/mikaylagawarecki
Ryo-not-rio pushed a commit to Ryo-not-rio/pytorch that referenced this pull request Dec 2, 2024
…140041)

Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* pytorch#79636 patches internal BUCK and bazel build
* pytorch#138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230

Pull Request resolved: pytorch#140041
Approved by: https://github.com/mikaylagawarecki
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…140041)

Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* pytorch#79636 patches internal BUCK and bazel build
* pytorch#138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230

Pull Request resolved: pytorch#140041
Approved by: https://github.com/mikaylagawarecki
fmo-mt pushed a commit to fmo-mt/pytorch that referenced this pull request Dec 11, 2024
…140041)

Summary:
Bump miniz version from 2.1.0 to 3.0.2 and apply these patches:

* pytorch#79636 patches internal BUCK and bazel build
* pytorch#138959 adds `bool compute_crc32` argument
* miniz PR: richgel999/miniz#324 to support
  zip64

Anyone bumping miniz version again, please apply these patches as well.

Test Plan:
Rely on unit test

Imported from OSS

Differential Revision: D65586230

Pull Request resolved: pytorch#140041
Approved by: https://github.com/mikaylagawarecki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant