Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_gzip_filter.c @ 144:ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 12 Oct 2003 16:49:16 +0000 |
parents | 656d468f4ead |
children | c71aeb75c071 |
comparison
equal
deleted
inserted
replaced
143:5526213be452 | 144:ef8c87afcfc5 |
---|---|
21 ngx_chain_t **last_out; | 21 ngx_chain_t **last_out; |
22 ngx_hunk_t *in_hunk; | 22 ngx_hunk_t *in_hunk; |
23 ngx_hunk_t *out_hunk; | 23 ngx_hunk_t *out_hunk; |
24 int hunks; | 24 int hunks; |
25 | 25 |
26 int length; | 26 off_t length; |
27 void *alloc; | 27 void *alloc; |
28 | 28 |
29 unsigned flush:4; | 29 unsigned flush:4; |
30 unsigned redo:1; | 30 unsigned redo:1; |
31 | 31 |
88 ngx_http_gzip_filter_init, /* init module */ | 88 ngx_http_gzip_filter_init, /* init module */ |
89 NULL /* init child */ | 89 NULL /* init child */ |
90 }; | 90 }; |
91 | 91 |
92 | 92 |
93 static char gzheader[10] = { 0x1f, 0x8b, Z_DEFLATED, 0, 0, 0, 0, 0, 0, 3 }; | 93 static char gzheader[10] = { 0x1f, |
94 (char) 0x8b, /* suppress MSVC warning */ | |
95 Z_DEFLATED, 0, 0, 0, 0, 0, 0, 3 }; | |
94 | 96 |
95 #if (HAVE_LITTLE_ENDIAN) | 97 #if (HAVE_LITTLE_ENDIAN) |
96 | 98 |
97 struct gztrailer { | 99 struct gztrailer { |
98 u_int crc32; | 100 u_int crc32; |
195 } | 197 } |
196 | 198 |
197 #if 0 | 199 #if 0 |
198 ngx_test_null(ctx->alloc, ngx_alloc(200K, r->log), NGX_ERROR); | 200 ngx_test_null(ctx->alloc, ngx_alloc(200K, r->log), NGX_ERROR); |
199 #else | 201 #else |
200 ctx->alloc = (void *) ~NULL; | 202 ctx->alloc = (void *) -1; |
201 #endif | 203 #endif |
202 | 204 |
203 rc = deflateInit2(&ctx->zstream, /**/ 1, Z_DEFLATED, | 205 rc = deflateInit2(&ctx->zstream, /**/ 1, Z_DEFLATED, |
204 -wbits, mem_level, Z_DEFAULT_STRATEGY); | 206 -wbits, mem_level, Z_DEFAULT_STRATEGY); |
205 | 207 |