Skip to content

Extraction of 5GB (ZIP64) archive created with Go failed #423

@philip-firstorder

Description

@philip-firstorder

To reproduce you need to zip a file bigger than 4GB with another smaller file, in my case my resulting archive it 5GB.

ZIP Method: Storage
Archiver: https://golang.org/src/archive/zip/writer.go

Error when unarchiving:
Screenshot 2019-06-26 at 16 21 15

I managed to unarchive from terminal using the unzip command. Also using The Unarchiver (Mac), 7zip (Windows). So the archive is not corrupted.

Here are the headers I printed from terminal.

$ zipinfo -v F3.zip

Archive:  F3.zip
There is no zipfile comment.

End-of-central-directory record:
-------------------------------

  Zip archive file size:                5928918633 (0000000161641E69h)
  Actual end-cent-dir record offset:    5928918532 (0000000161641E04h)
  Expected end-cent-dir record offset:  5928918532 (0000000161641E04h)
  (based on the length of the central directory and its expected offset)

  This zipfile constitutes the sole disk of a single-part archive; its
  central directory contains 2 entries.
  The central directory is 270 (000000000000010Eh) bytes long,
  and its (expected) offset in bytes from the beginning of the zipfile
  is 5928918262 (0000000161641CF6h).


Central directory entry #1:
---------------------------

  Archive 5GB.zip

  offset of local header from start of archive:   0
                                                  (0000000000000000h) bytes
  file system or operating system of origin:      MS-DOS, OS/2 or NT FAT
  version of encoding software:                   2.0
  minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
  minimum software version required to extract:   4.5
  compression method:                             none (stored)
  file security status:                           not encrypted
  extended local header:                          yes
  file last modified on (DOS date/time):          2019 Jun 19 19:34:28
  file last modified on (UT extra field modtime): 2019 Jun 19 19:34:28 local
  file last modified on (UT extra field modtime): 2019 Jun 19 17:34:28 UTC
  32-bit CRC value (hex):                         06691a94
  compressed size:                                5720868503 bytes
  uncompressed size:                              5720868503 bytes
  length of filename:                             15 characters
  length of extra field:                          37 bytes
  length of file comment:                         40 characters
  disk number on which file begins:               disk 1
  apparent file type:                             binary
  non-MSDOS external file attributes:             000000 hex
  MS-DOS file attributes (00 hex):                none

  The central-directory extra field contains:
  - A subfield with ID 0x5455 (universal time) and 5 data bytes.
    The local extra field has UTC/GMT modification time.
  - A subfield with ID 0x0001 (PKWARE 64-bit sizes) and 24 data bytes:
    97 86 fd 54 01 00 00 00 97 86 fd 54 01 00 00 00 00 00 00 00 00 00 00 00.

------------------------- file comment begins ----------------------------
5d0105dcabf05d83dd8014bb/Archive 5GB.zip
-------------------------- file comment ends -----------------------------

Central directory entry #2:
---------------------------

  There are an extra -4 bytes preceding this file.

  DJI 0044.mov

  offset of local header from start of archive:   5720868581
                                                  (0000000154FD86E5h) bytes
  file system or operating system of origin:      MS-DOS, OS/2 or NT FAT
  version of encoding software:                   2.0
  minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
  minimum software version required to extract:   2.0
  compression method:                             none (stored)
  file security status:                           not encrypted
  extended local header:                          yes
  file last modified on (DOS date/time):          2019 Jun 24 17:04:38
  file last modified on (UT extra field modtime): 2019 Jun 24 17:04:39 local
  file last modified on (UT extra field modtime): 2019 Jun 24 15:04:39 UTC
  32-bit CRC value (hex):                         68b23c95
  compressed size:                                208049614 bytes
  uncompressed size:                              208049614 bytes
  length of filename:                             12 characters
  length of extra field:                          37 bytes
  length of file comment:                         37 characters
  disk number on which file begins:               disk 1
  apparent file type:                             binary
  non-MSDOS external file attributes:             000000 hex
  MS-DOS file attributes (00 hex):                none

  The central-directory extra field contains:
  - A subfield with ID 0x5455 (universal time) and 5 data bytes.
    The local extra field has UTC/GMT modification time.
  - A subfield with ID 0x0001 (PKWARE 64-bit sizes) and 24 data bytes:
    ce 95 66 0c 00 00 00 00 ce 95 66 0c 00 00 00 00 e5 86 fd 54 01 00 00 00.

------------------------- file comment begins ----------------------------
5d013d45409327f33177b621/DJI 0044.mov
-------------------------- file comment ends -----------------------------

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions