blob: 5c7c8cb981b26b5ce66173028596cb5dc397515c [file] [log] [blame]
William Lallemand82fe75c2012-10-23 10:25:10 +02001/*
2 * include/proto/compression.h
3 * This file defines function prototypes for compression.
4 *
5 * Copyright 2012 (C) Exceliance, David Du Colombier <dducolombier@exceliance.fr>
6 * William Lallemand <wlallemand@exceliance.fr>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation, version 2.1
11 * exclusively.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef _PROTO_COMP_H
24#define _PROTO_COMP_H
25
26#include <types/compression.h>
27
William Lallemand072a2bf2012-11-20 17:01:01 +010028extern unsigned int compress_min_idle;
29
William Lallemand82fe75c2012-10-23 10:25:10 +020030int comp_append_type(struct comp *comp, const char *type);
31int comp_append_algo(struct comp *comp, const char *algo);
32
Willy Tarreau15530d22015-03-28 12:05:47 +010033int http_emit_chunk_size(char *end, unsigned int chksz);
Willy Tarreau87b09662015-04-03 00:22:06 +020034int http_compression_buffer_init(struct stream *s, struct buffer *in, struct buffer *out);
35int http_compression_buffer_add_data(struct stream *s, struct buffer *in, struct buffer *out);
36int http_compression_buffer_end(struct stream *s, struct buffer **in, struct buffer **out, int end);
William Lallemand82fe75c2012-10-23 10:25:10 +020037
William Lallemand82fe75c2012-10-23 10:25:10 +020038#ifdef USE_ZLIB
William Lallemande3a7d992012-11-20 11:25:20 +010039extern long zlib_used_memory;
William Lallemand82fe75c2012-10-23 10:25:10 +020040#endif /* USE_ZLIB */
41
42#endif /* _PROTO_COMP_H */
43
44/*
45 * Local variables:
46 * c-indent-level: 8
47 * c-basic-offset: 8
48 * End:
49 */