VirtualBox

Changeset 59753 in vbox


Ignore:
Timestamp:
Feb 20, 2016 1:51:56 AM (9 years ago)
Author:
vboxsync
Message:

gzipvfs.cpp: Pass correct flag to autodetect gzip header. Can't tell zlib to not detect zlib headers via inflateInit2 it seems, but never mind, we're checking that right below ourselfes.

File:
1 edited

Legend:

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

    r59620 r59753  
    710710        memset(&pThis->Zlib, 0, sizeof(pThis->Zlib));
    711711        pThis->Zlib.opaque  = pThis;
    712         rc = inflateInit2(&pThis->Zlib,
    713                           fFlags & RTZIPGZIPDECOMP_F_ALLOW_ZLIB_HDR
    714                           ? MAX_WBITS
    715                           : MAX_WBITS + 16 /* autodetect gzip header */);
     712        rc = inflateInit2(&pThis->Zlib, MAX_WBITS | RT_BIT(5) /* autodetect gzip header */);
    716713        if (rc >= 0)
    717714        {
     
    720717             * a gzip stream as specified by the user.
    721718             *
    722              * Note!. Since we've told zlib to check for the gzip header, we
    723              *        prebuffer what we read in the input buffer so it can
    724              *        be handed on to zlib later on.
     719             * Note! Since we've told zlib to check for the gzip header, we
     720             *       prebuffer what we read in the input buffer so it can
     721             *       be handed on to zlib later on.
    725722             */
    726723            rc = RTVfsIoStrmRead(pThis->hVfsIos, pThis->abBuffer, sizeof(RTZIPGZIPHDR), true /*fBlocking*/, NULL /*pcbRead*/);
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