Lines Matching refs:stream

399 	php_stream *stream;  in PHP_FUNCTION()  local
408stream = php_stream_gzopen(NULL, filename, "rb", use_include_path | ENFORCE_SAFE_MODE | REPORT_ERR… in PHP_FUNCTION()
409 if (stream == NULL) { in PHP_FUNCTION()
420 while (php_stream_gets(stream, buf, sizeof(buf) - 1) != NULL) { in PHP_FUNCTION()
430 php_stream_close(stream); in PHP_FUNCTION()
441 php_stream *stream; in PHP_FUNCTION() local
450stream = php_stream_gzopen(NULL, filename, mode, use_include_path | ENFORCE_SAFE_MODE | REPORT_ERR… in PHP_FUNCTION()
452 if (!stream) { in PHP_FUNCTION()
455 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
469 php_stream *stream; in PHP_FUNCTION() local
479stream = php_stream_gzopen(NULL, filename, "rb", use_include_path | ENFORCE_SAFE_MODE, NULL, NULL … in PHP_FUNCTION()
480 if (!stream) { in PHP_FUNCTION()
483 size = php_stream_passthru(stream); in PHP_FUNCTION()
484 php_stream_close(stream); in PHP_FUNCTION()
583 z_stream stream; in PHP_FUNCTION() local
595 stream.data_type = Z_ASCII; in PHP_FUNCTION()
596 stream.zalloc = php_zlib_alloc; in PHP_FUNCTION()
597 stream.zfree = php_zlib_free; in PHP_FUNCTION()
598 stream.opaque = (voidpf) Z_NULL; in PHP_FUNCTION()
600 stream.next_in = (Bytef *) data; in PHP_FUNCTION()
601 stream.avail_in = data_len; in PHP_FUNCTION()
603stream.avail_out = stream.avail_in + (stream.avail_in / PHP_ZLIB_MODIFIER) + 15 + 1; /* room for \… in PHP_FUNCTION()
605 s2 = (char *) emalloc(stream.avail_out); in PHP_FUNCTION()
610 stream.next_out = s2; in PHP_FUNCTION()
613 status = deflateInit2(&stream, level, Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, 0); in PHP_FUNCTION()
615 status = deflate(&stream, Z_FINISH); in PHP_FUNCTION()
617 deflateEnd(&stream); in PHP_FUNCTION()
622 status = deflateEnd(&stream); in PHP_FUNCTION()
627 s2 = erealloc(s2,stream.total_out + 1); /* resize to buffer to the "right" size */ in PHP_FUNCTION()
628 s2[ stream.total_out ] = '\0'; in PHP_FUNCTION()
629 RETURN_STRINGL(s2, stream.total_out, 0); in PHP_FUNCTION()
647 z_stream stream; in PHP_FUNCTION() local
663 stream.zalloc = php_zlib_alloc; in PHP_FUNCTION()
664 stream.zfree = php_zlib_free; in PHP_FUNCTION()
665 stream.opaque = Z_NULL; in PHP_FUNCTION()
666 stream.avail_in = data_len + 1; /* there is room for \0 */ in PHP_FUNCTION()
667 stream.next_in = (Bytef *) data; in PHP_FUNCTION()
668 stream.total_out = 0; in PHP_FUNCTION()
671 status = inflateInit2(&stream, -MAX_WBITS); in PHP_FUNCTION()
692 inflateEnd(&stream); in PHP_FUNCTION()
697 stream.next_out = (Bytef *) &s2[stream.total_out]; in PHP_FUNCTION()
698 stream.avail_out = length - stream.total_out; in PHP_FUNCTION()
699 status = inflate(&stream, Z_NO_FLUSH); in PHP_FUNCTION()
701 …} while ((Z_BUF_ERROR == status || (Z_OK == status && stream.avail_in)) && !plength && factor < ma… in PHP_FUNCTION()
703 inflateEnd(&stream); in PHP_FUNCTION()
710 s2 = erealloc(s2, stream.total_out + 1); /* room for \0 */ in PHP_FUNCTION()
711 s2[ stream.total_out ] = '\0'; in PHP_FUNCTION()
712 RETURN_STRINGL(s2, stream.total_out, 0); in PHP_FUNCTION()
753 ZLIBG(stream).next_out = buffer + start_offset; in php_do_deflate()
754 ZLIBG(stream).avail_out = outlen; in php_do_deflate()
756 err = deflate(&ZLIBG(stream), Z_SYNC_FLUSH); in php_do_deflate()
757 while (err == Z_OK && !ZLIBG(stream).avail_out) { in php_do_deflate()
764 ZLIBG(stream).next_out = buffer + start_offset + prev_outlen; in php_do_deflate()
765 ZLIBG(stream).avail_out = prev_outlen * 2; in php_do_deflate()
767 err = deflate(&ZLIBG(stream), Z_SYNC_FLUSH); in php_do_deflate()
771 err = deflate(&ZLIBG(stream), Z_FINISH); in php_do_deflate()
772 buffer[outlen + start_offset - ZLIBG(stream).avail_out] = '\0'; in php_do_deflate()
776 *p_buffer_len = outlen - ZLIBG(stream).avail_out; in php_do_deflate()
789 ZLIBG(stream).zalloc = php_zlib_alloc; in php_deflate_string()
790 ZLIBG(stream).zfree = php_zlib_free; in php_deflate_string()
791 ZLIBG(stream).opaque = Z_NULL; in php_deflate_string()
796 …if (deflateInit2(&ZLIBG(stream), ZLIBG(output_compression_level), Z_DEFLATED, -MAX_WBITS, MAX_MEM_… in php_deflate_string()
805 if (deflateInit(&ZLIBG(stream), ZLIBG(output_compression_level)) != Z_OK) { in php_deflate_string()
813 ZLIBG(stream).next_in = (Bytef *) str; in php_deflate_string()
814 ZLIBG(stream).avail_in = (uInt) str_length; in php_deflate_string()
841 trailer[4] = (char) ZLIBG(stream).total_in & 0xFF; in php_deflate_string()
842 trailer[5] = (char) (ZLIBG(stream).total_in >> 8) & 0xFF; in php_deflate_string()
843 trailer[6] = (char) (ZLIBG(stream).total_in >> 16) & 0xFF; in php_deflate_string()
844 trailer[7] = (char) (ZLIBG(stream).total_in >> 24) & 0xFF; in php_deflate_string()
848 deflateEnd(&ZLIBG(stream)); in php_deflate_string()
863 z_stream stream; in PHP_FUNCTION() local
879 stream.zalloc = php_zlib_alloc; in PHP_FUNCTION()
880 stream.zfree = php_zlib_free; in PHP_FUNCTION()
881 stream.opaque = Z_NULL; in PHP_FUNCTION()
883 stream.next_in = (Bytef *) data; in PHP_FUNCTION()
884 stream.avail_in = data_len; in PHP_FUNCTION()
886stream.avail_out = stream.avail_in + (stream.avail_in / PHP_ZLIB_MODIFIER) + 15 + 1; /* room for \… in PHP_FUNCTION()
887 …s2 = (char *) emalloc(stream.avail_out + GZIP_HEADER_LENGTH + (coding == CODING_GZIP ? GZIP_FOOTER… in PHP_FUNCTION()
896 stream.next_out = &(s2[GZIP_HEADER_LENGTH]); in PHP_FUNCTION()
901 …if ((status = deflateInit2(&stream, level, Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, Z_DEFAULT_STRATE… in PHP_FUNCTION()
908 if ((status = deflateInit(&stream, level)) != Z_OK) { in PHP_FUNCTION()
915 status = deflate(&stream, Z_FINISH); in PHP_FUNCTION()
917 deflateEnd(&stream); in PHP_FUNCTION()
922 status = deflateEnd(&stream); in PHP_FUNCTION()
927 …s2 = erealloc(s2, stream.total_out + GZIP_HEADER_LENGTH + (coding == CODING_GZIP ? GZIP_FOOTER_LEN… in PHP_FUNCTION()
930 char *trailer = s2 + (stream.total_out + GZIP_HEADER_LENGTH); in PHP_FUNCTION()
940 trailer[4] = (char) stream.total_in & 0xFF; in PHP_FUNCTION()
941 trailer[5] = (char) (stream.total_in >> 8) & 0xFF; in PHP_FUNCTION()
942 trailer[6] = (char) (stream.total_in >> 16) & 0xFF; in PHP_FUNCTION()
943 trailer[7] = (char) (stream.total_in >> 24) & 0xFF; in PHP_FUNCTION()
946 …s2[stream.total_out + GZIP_HEADER_LENGTH + (coding == CODING_GZIP ? GZIP_FOOTER_LENGTH : 0)] = '\0… in PHP_FUNCTION()
948 …RETURN_STRINGL(s2, stream.total_out + GZIP_HEADER_LENGTH + (coding == CODING_GZIP ? GZIP_FOOTER_LE… in PHP_FUNCTION()