+/* {{{ proto HttpDeflateStream HttpDeflateStream::factory([int flags[, string class = "HttpDeflateStream"]])
+ Creates a new HttpDeflateStream object instance. */
+PHP_METHOD(HttpDeflateStream, factory)
+{
+ long flags = 0;
+ char *cn = NULL;
+ int cl = 0;
+
+ SET_EH_THROW_HTTP();
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ls", &flags, &cn, &cl)) {
+ zend_object_value ov;
+ http_encoding_stream *s = http_encoding_deflate_stream_init(NULL, flags & 0x0fffffff);
+
+ if (SUCCESS == http_object_new(&ov, cn, cl, _http_deflatestream_object_new_ex, http_deflatestream_object_ce, s, NULL)) {
+ RETVAL_OBJVAL(ov, 0);
+ }
+ }
+ SET_EH_NORMAL();
+}
+/* }}} */
+