VirtualBox

Changeset 16823 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Feb 17, 2009 10:41:45 AM (16 years ago)
Author:
vboxsync
Message:

Runtime/zip: make zlib reader more greedy to fix issue with incompressible blocks which are slightly larger than the input buffer in a more sane way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/zip.cpp

    r16164 r16823  
    3434*******************************************************************************/
    3535#define RTZIP_USE_STORE 1
    36 //#define RTZIP_USE_ZLIB 1
     36#define RTZIP_USE_ZLIB 1
    3737//#define RTZIP_USE_BZLIB 1
    3838#define RTZIP_USE_LZF 1
     
    555555    pZip->u.Zlib.avail_out = cbBuf;
    556556    int rc = Z_OK;
    557     while (pZip->u.Zlib.avail_out > 0)
     557    /* Be greedy reading input, even if no output buffer is left. It's possible
     558     * that it's just the end of stream marker which needs to be read. Happens
     559     * for incompressible blocks just larger than the input buffer size.*/
     560    while (pZip->u.Zlib.avail_out > 0 || pZip->u.Zlib.avail_in <= 0)
    558561    {
    559562        /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette