summaryrefslogtreecommitdiff
path: root/include/compress.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/compress.h')
-rw-r--r--include/compress.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/compress.h b/include/compress.h
new file mode 100644
index 0000000..d527307
--- /dev/null
+++ b/include/compress.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+#ifndef COMPRESS_H
+#define COMPRESS_H
+
+#include <sys/types.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include "squashfs.h"
+
+typedef struct compressor_t compressor_t;
+
+struct compressor_t {
+ ssize_t (*do_block)(compressor_t *cmp, uint8_t *block, size_t outsize);
+
+ void (*destroy)(compressor_t *stream);
+};
+
+bool compressor_exists(E_SQFS_COMPRESSOR id);
+
+compressor_t *compressor_create(E_SQFS_COMPRESSOR id, bool compress,
+ size_t block_size);
+
+#endif /* COMPRESS_H */