private void setSizesAndOffsetFromZip64Extra( final ZipEntry ze, final OffsetEntry offset, final int diskStart) throws IOException { final Zip64ExtendedInformationExtraField z64 = (Zip64ExtendedInformationExtraField) ze.getExtraField(Zip64ExtendedInformationExtraField.HEADER_ID); if (z64 != null) { final boolean hasUncompressedSize = ze.getSize() == 4294967295L; final boolean hasCompressedSize = ze.getCompressedSize() == 4294967295L; final boolean hasRelativeHeaderOffset = offset.headerOffset == 4294967295L; z64.reparseCentralDirectoryData( hasUncompressedSize, hasCompressedSize, hasRelativeHeaderOffset, diskStart == 65535); if (hasUncompressedSize) { ze.setSize(z64.getSize().getLongValue()); } else if (hasCompressedSize) { z64.setSize(new ZipEightByteInteger(ze.getSize())); } if (hasCompressedSize) { ze.setCompressedSize(z64.getCompressedSize().getLongValue()); } else if (hasUncompressedSize) { z64.setCompressedSize(new ZipEightByteInteger(ze.getCompressedSize())); } if (hasRelativeHeaderOffset) { offset.headerOffset = z64.getRelativeHeaderOffset().getLongValue(); } } }