Ignore:
Timestamp:
Mar 26, 2018 1:43:34 PM (5 years ago)
Author:
clarksm
Message:

Set gzip header OS byte to unknown. Matches the tkImg version
used in Rappture GUI and wrapper scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7/src/core/RpBuffer.cc

    r5850 r6694  
    270270    int ret=0, flush=0;
    271271    z_stream strm;
     272    gz_header gzheader;
    272273
    273274    char in[CHUNK];
     
    287288    if (ret != Z_OK) {
    288289        status.addError("error while initializing zlib stream object");
     290        return false;
     291    }
     292
     293    gzheader.text = 0;
     294    gzheader.hcrc = 0;
     295    gzheader.extra = Z_NULL;
     296    gzheader.name = Z_NULL;
     297    gzheader.comment = Z_NULL;
     298    gzheader.time = 0;
     299    gzheader.os = 0xff;  /* Force originating source OS to be unknown.
     300                            This matches what is done with the tkImg version
     301                            of zlib.  */
     302
     303    ret = deflateSetHeader( &strm, &gzheader);
     304
     305    if (ret != Z_OK) {
     306        status.addError("error while initializing zlib gzip header object");
    289307        return false;
    290308    }
Note: See TracChangeset for help on using the changeset viewer.