Bug #1280 » zlib.patch
| ext/zlib/zlib.c (working copy) | ||
|---|---|---|
|
z->stream.avail_out = 0;
|
||
|
}
|
||
|
else {
|
||
|
if (z->stream.avail_out >= len) {
|
||
|
if (z->stream.avail_out >= (uInt)len) {
|
||
|
z->stream.avail_out -= len;
|
||
|
}
|
||
|
else {
|
||
| ... | ... | |
|
static void
|
||
|
zstream_discard_input(struct zstream *z, unsigned int len)
|
||
|
{
|
||
|
if (NIL_P(z->input) || RSTRING_LEN(z->input) <= len) {
|
||
|
if (NIL_P(z->input) || (unsigned int)RSTRING_LEN(z->input) <= len) {
|
||
|
z->input = Qnil;
|
||
|
}
|
||
|
else {
|
||
| ... | ... | |
|
buf[1] = GZ_MAGIC2;
|
||
|
buf[2] = GZ_METHOD_DEFLATE;
|
||
|
buf[3] = flags;
|
||
|
gzfile_set32(gz->mtime, &buf[4]);
|
||
|
gzfile_set32((unsigned long)gz->mtime, &buf[4]);
|
||
|
buf[8] = extraflags;
|
||
|
buf[9] = gz->os_code;
|
||
|
zstream_append_buffer(&gz->z, buf, sizeof(buf));
|
||