*** empty log message ***
[gnutls.git] / lib / gnutls_compress_int.h
blob284e6a1479c97d0e858774403578547f9fb925f7
1 /*
2 * Copyright (C) 2000,2002 Nikos Mavroyanopoulos
4 * This file is part of GNUTLS.
6 * GNUTLS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GNUTLS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 #ifndef GNUTLS_COMP_INT
22 # define GNUTLS_COMP_INT
24 #ifdef HAVE_LIBZ
25 # include <zlib.h>
26 #endif
28 #define GNUTLS_COMP_FAILED NULL
30 typedef struct GNUTLS_COMP_HANDLE_STRUCT {
31 void* handle;
32 CompressionMethod algo;
33 } *GNUTLS_COMP_HANDLE;
35 GNUTLS_COMP_HANDLE _gnutls_comp_init( CompressionMethod, int d);
36 void _gnutls_comp_deinit(GNUTLS_COMP_HANDLE handle, int d);
38 int _gnutls_decompress( GNUTLS_COMP_HANDLE handle, char* compressed, int compressed_size, char** plain, int max_record_size);
39 int _gnutls_compress( GNUTLS_COMP_HANDLE, char* plain, int plain_size, char** compressed, int max_comp_size);
41 #endif