summaryrefslogtreecommitdiff
path: root/include/lib/inflate.h
blob: af2b4f7d8ffe3f4ba986af303e97b44d5dc5edb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * zlib-deflate-nostdlib
 *
 * Copyright 2021 Daniel Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <stdint.h>

#define DEFLATE_ERR_INPUT_LENGTH (-1)
#define DEFLATE_ERR_METHOD (-2)
#define DEFLATE_ERR_FDICT (-3)
#define DEFLATE_ERR_BLOCK (-4)
#define DEFLATE_ERR_CHECKSUM (-5)
#define DEFLATE_ERR_OUTPUT_LENGTH (-6)
#define DEFLATE_ERR_FCHECK (-7)
#define DEFLATE_ERR_NLEN (-8)
#define DEFLATE_ERR_HUFFMAN (-9)

int16_t inflate(unsigned char *input_buf, uint16_t input_len,
		unsigned char *output_buf, uint16_t output_len);
int16_t inflate_zlib(unsigned char *input_buf, uint16_t input_len,
		     unsigned char *output_buf, uint16_t output_len);