Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !9

Reset compressed size when combining JAR/ZIP archives

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/spearce/fix-jarjarsz into master Apr 30, 2013
  • Overview 9
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: spearce

zlib does not always deflate a resource to the same compressed size as the original input. The input resource may have been compressed using a different version of libz, or different compression settings.

Before adding each entry to the ZIP, clone the entry and reinitialize the compressed field to -1 as is done by the more commonly used ZipEntry(String) constructor.

This fixes a rare case where including a JAR in a java_binary() may throw an error such as:

invalid entry compressed size (expected 4271 but got 4275 bytes)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/spearce/fix-jarjarsz