summaryrefslogtreecommitdiff
path: root/src/inflate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inflate.h')
-rw-r--r--src/inflate.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/inflate.h b/src/inflate.h
new file mode 100644
index 0000000..575be4a
--- /dev/null
+++ b/src/inflate.h
@@ -0,0 +1,23 @@
+/*
+ * 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)
+
+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);