summaryrefslogtreecommitdiff
path: root/inc/huffman.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/huffman.h')
-rw-r--r--inc/huffman.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/inc/huffman.h b/inc/huffman.h
new file mode 100644
index 0000000..1ac7ff6
--- /dev/null
+++ b/inc/huffman.h
@@ -0,0 +1,16 @@
+#ifndef HUFFMAN_H
+#define HUFFMAN_H
+
+/* Initialize huffman */
+/* Uses the standard frequency table if NULL is provided */
+void inithuff(const unsigned int *frequencies);
+
+/* Compress contents of input buffer, result in output buffer */
+/* Returns -1 on too small output buffer */
+int compresshuff(const char *inputbuff, int inputsize, char *outputbuff, int outputsize);
+
+/* Decompress contents of input buffer, result in output buffer */
+/* Returns -1 on decompress error */
+int decompresshuff(const char *inputbuff, int inputsize, char *outputbuff, int outputsize);
+
+#endif // HUFFMAN_H