Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • unzipfile fails to extract files larger than 4 GiB

    I'm trying to use unzipfile in Stata 14.1 to extract a ~1 GiB zip file containing a ~5 GiB text file. unzipfile fails with
    Code:
    I/O error
    could not perform unzip
    r(601)
    It seems to extract the first 230 - 1 bytes correctly.

    The file system is NTFS and I can extract the file with other tools (7-zip and the built-in Windows tool).
    Last edited by Diogo Pereira; 13 Dec 2015, 09:11.

  • #2
    This still does not work in Stata 15.

    Comment


    • #3
      Apparently Stata is not among those who support the ZIP64 format extensions as described here in Wikipedia.

      Comment


      • #4
        If the reason for doing this is to include unzipping the file as part of a running script in a do-file, and you have other programs that can do the unzipping, you can still accomplish that by using the -!windows_command- syntax which forks a Windows shell process that executes the Windows command, waits for it to complete, and then returns control to the do-file. And, you can even reference Stata local macros inside the windows_command: Stata dereferences the macros and passes the command to Windows with the values of the macros substituted in.

        Comment


        • #5
          The file size limit is a result of the library used to handle the back-end [de]compression routines. Switching the code to use a 64-bit library will fix this issue. I will get the fix out in a future update to Stata.

          Comment


          • #6
            This issue has been fixed in the 15.1 update.

            Comment


            • #7
              Originally posted by Kevin Crow (StataCorp) View Post
              This issue has been fixed in the 15.1 update.
              Thanks. I have just updated and verified that it now works as expected.

              Comment

              Working...
              X