Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 72 lines (57 sloc) 2.414 kB
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /* Cherokee
4 *
5 * Authors:
6 * Alvaro Lopez Ortega <alvaro@alobbs.com>
7 *
920e20b @alobbs Happy new year!
alobbs authored
8 * Copyright (C) 2001-2011 Alvaro Lopez Ortega
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
2c39092 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@2660 5dc97367-9…
alobbs authored
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301, USA.
72f6444 @alobbs Clean up: Trims trailing spaces.
alobbs authored
23 */
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
24
25 #ifndef CHEROKEE_ENCODE_DEFLATE_H
26 #define CHEROKEE_ENCODE_DEFLATE_H
27
28 #include <common.h>
29
30 #include "zlib/zlib.h"
31 #include "module.h"
32 #include "encoder.h"
033d78a @alobbs By default, do not use the GZip encoder with Internet Explorer clients
alobbs authored
33 #include "connection.h"
9ac16f7 @alobbs Enables encoder plug-ins to process its own configuration section.
alobbs authored
34 #include "plugin_loader.h"
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
35
36 /* Data types
37 */
38 typedef struct {
9ac16f7 @alobbs Enables encoder plug-ins to process its own configuration section.
alobbs authored
39 cherokee_encoder_props_t base;
40 int compression_level;
41 } cherokee_encoder_deflate_props_t;
42
43 typedef struct {
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
44 cherokee_encoder_t base;
45 z_stream stream;
46 void *workspace;
47 } cherokee_encoder_deflate_t;
48
49
9ac16f7 @alobbs Enables encoder plug-ins to process its own configuration section.
alobbs authored
50 #define PROP_DEFLATE(x) ((cherokee_encoder_deflate_props_t *)(x))
51 #define ENC_DEFLATE(x) ((cherokee_encoder_deflate_t *)(x))
52 #define ENC_DEFLATE_PROP(x) (PROP_DEFLATE(MODULE(x)->props))
53
54
55 /* Library init function
56 */
57 void PLUGIN_INIT_NAME(deflate) (cherokee_plugin_loader_t *loader);
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
58
59 /* Methods
60 */
9ac16f7 @alobbs Enables encoder plug-ins to process its own configuration section.
alobbs authored
61 ret_t cherokee_encoder_deflate_new (cherokee_encoder_deflate_t **encoder,
62 cherokee_encoder_props_t *props);
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
63
64 ret_t cherokee_encoder_deflate_free (cherokee_encoder_deflate_t *encoder);
65
66 ret_t cherokee_encoder_deflate_add_headers (cherokee_encoder_deflate_t *encoder, cherokee_buffer_t *buf);
033d78a @alobbs By default, do not use the GZip encoder with Internet Explorer clients
alobbs authored
67 ret_t cherokee_encoder_deflate_init (cherokee_encoder_deflate_t *encoder, cherokee_connection_t *conn);
e5c7c1b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1558 5dc97367-9…
alobbs authored
68 ret_t cherokee_encoder_deflate_encode (cherokee_encoder_deflate_t *encoder, cherokee_buffer_t *in, cherokee_buffer_t *out);
69 ret_t cherokee_encoder_deflate_flush (cherokee_encoder_deflate_t *encoder, cherokee_buffer_t *in, cherokee_buffer_t *out);
70
71 #endif /* CHEROKEE_ENCODE_DEFLATE_H */
Something went wrong with that request. Please try again.