From 4d88a39160bc389b3198bc81b280093beea1790e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 20 Jan 2021 19:44:23 +0100 Subject: Turn udeflate into a proper library --- include/lib/udeflate.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/lib/udeflate.h (limited to 'include') 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 + +#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); -- cgit v1.2.3