ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33310] New: - Zip task can't zip files larger than 2GB (2^31 bytes int limit reached) : "invalid entry size"
Date Mon, 31 Jan 2005 09:08:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33310>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33310

           Summary: Zip task can't zip files larger than 2GB (2^31 bytes int
                    limit reached) : "invalid entry size"
           Product: Ant
           Version: 1.6.2
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: apernoud@sopragroup.com


I have a batch running ant and zipping large files (dumps from DB).
When dumps exceed 2GBytes (2^31 bytes), the zip task makes this exception in 
original ZipEntry class : "invalid entry size".
Looking the source code, it's ZipOutputStream closeEntry() method that passes a 
int to a long required method (ZipEntry.setSize can take long) :
            entry.setSize(def.getTotalIn());

So when you just break the 2^31 limit of int, def.getTotalIn() is negative, and 
ZipEntry doesn't accept it.
Here def is the deflater, and only has getter that gives int :(

I have no idea of how to resolve the issue since there do not seem to have a 
long getter on deflater, but there may be a way to get the real size directly 
instead of using the deflater ?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message