You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2021/09/18 13:54:17 UTC

[Bug 65581] New: add optional support in ZipArchiveFakeEntry to use a temp file

https://bz.apache.org/bugzilla/show_bug.cgi?id=65581

            Bug ID: 65581
           Summary: add optional support in ZipArchiveFakeEntry to use a
                    temp file
           Product: POI
           Version: 5.0.x-dev
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: fanningpj@yahoo.com
  Target Milestone: ---

Currently, ZipArchiveFakeEntry will read all the bytes of the file into memory
unless there are more than 2GB (Integer.MAX_VALUE) - in which case it throws an
error.

The workaround is to load the data from a java.io.File instead of an
InputStream but this may not be obvious or straightforward.

Aim is to have a configurable value at which ZipArchiveFakeEntry creates a temp
file (or an equivalent class).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65581] add optional support in ZipArchiveFakeEntry to use a temp file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65581

--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
added implementation using r1893421

Using this will mean all zip entries with greater than 50Mb decompressed data
will be put in a temp file instead of kept in memory.
        ZipInputStreamZipEntrySource.setThresholdBytesForTempFiles(50000000);

This only affects users when they read files using Input Streams instead of
reading directly from a java.io.File.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65581] add optional support in ZipArchiveFakeEntry to use a temp file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65581

--- Comment #3 from PJ Fanning <fa...@yahoo.com> ---
ZipInputStreamZipEntrySource.setEncryptTempFiles(true); //also now supported

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65581] add optional support in ZipArchiveFakeEntry to use a temp file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65581

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
IOException("ZIP entry size is too large or invalid") is the existing exception

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65581] add optional support in ZipArchiveFakeEntry to use a temp file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65581

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65581] add optional support in ZipArchiveFakeEntry to use a temp file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65581

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X 10.1               |All
           Hardware|PC                          |All

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org