diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-01-20 19:44:23 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-01-20 19:44:23 +0100 |
commit | 4d88a39160bc389b3198bc81b280093beea1790e (patch) | |
tree | 16e4b56b5bfa31ce31cf1dae54e1043508dd20e1 /include | |
parent | 4c7184fae8caa47d4f1294d9e93e50ed429c65af (diff) |
Turn udeflate into a proper library
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/udeflate.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/lib/udeflate.h b/include/lib/udeflate.h new file mode 100644 index 0000000..e751374 --- /dev/null +++ b/include/lib/udeflate.h @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <stdint.h> + +#define UDEFLATE_ERR_LENGTH (-1) +#define UDEFLATE_ERR_METHOD (-2) +#define UDEFLATE_ERR_FDICT (-3) +#define UDEFLATE_ERR_BLOCK (-4) +#define UDEFLATE_ERR_CHECKSUM (-5) + +int8_t udeflate(unsigned char *input_buf, uint16_t input_len, + unsigned char *output_buf, uint16_t output_len); +int8_t udeflate_zlib(unsigned char *input_buf, uint16_t input_len, + unsigned char *output_buf, uint16_t output_len); |