My Project
Loading...
Searching...
No Matches
compress.h
Go to the documentation of this file.
1/* compress.h
2 *
3 * Copyright (C) 2006-2020 wolfSSL Inc.
4 *
5 * This file is part of wolfSSL.
6 *
7 * wolfSSL is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * wolfSSL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20 */
21
27#ifndef WOLF_CRYPT_COMPRESS_H
28#define WOLF_CRYPT_COMPRESS_H
29
31
32#ifdef HAVE_LIBZ
33
34#ifdef __cplusplus
35 extern "C" {
36#endif
37
38
39#define COMPRESS_FIXED 1
40
41#define LIBZ_WINBITS_GZIP 16
42
43
44WOLFSSL_API int wc_Compress(byte*, word32, const byte*, word32, word32);
45WOLFSSL_API int wc_Compress_ex(byte* out, word32 outSz, const byte* in,
46 word32 inSz, word32 flags, word32 windowBits);
47WOLFSSL_API int wc_DeCompress(byte*, word32, const byte*, word32);
48WOLFSSL_API int wc_DeCompress_ex(byte* out, word32 outSz, const byte* in,
49 word32 inSz, int windowBits);
50
51#ifdef __cplusplus
52 } /* extern "C" */
53#endif
54
55
56#endif /* HAVE_LIBZ */
57#endif /* WOLF_CRYPT_COMPRESS_H */
58
WOLFSSL_API int wc_DeCompress(byte *, word32, const byte *, word32)
This function decompresses the given compressed data using Huffman coding and stores the output in ou...
Definition compress.c:191
WOLFSSL_API int wc_Compress(byte *, word32, const byte *, word32, word32)
This function compresses the given input data using Huffman coding and stores the output in out....
Definition compress.c:125