summaryrefslogtreecommitdiff
path: root/include/compress_cli.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-11-07 16:04:40 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-11-07 16:12:47 +0100
commit411f659fe0140bacbd56f8503cda269816d4a887 (patch)
tree1b1f97a2964d550292790d949471eff96776d11c /include/compress_cli.h
parent73e853f9660072abf0ae68cbb5d9753ac6e9034a (diff)
Cleanup: libcommon: try to split up some of the larger files
The sqsf_writer is moved to a separate header, as well as the compressor related stuff. The statistics function is moved into the writer code, as this is the only place that actually uses it. The writer code itself is split up into a hand full of file in their own subdirectory. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/compress_cli.h')
-rw-r--r--include/compress_cli.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/compress_cli.h b/include/compress_cli.h
new file mode 100644
index 0000000..1ac7972
--- /dev/null
+++ b/include/compress_cli.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+/*
+ * compress_cli.h
+ *
+ * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
+ */
+#ifndef COMPRESS_CLI_H
+#define COMPRESS_CLI_H
+
+#include "sqfs/compressor.h"
+#include "sqfs/super.h"
+#include "sqfs/block.h"
+#include "sqfs/error.h"
+#include "sqfs/io.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void compressor_print_available(void);
+
+SQFS_COMPRESSOR compressor_get_default(void);
+
+int compressor_cfg_init_options(sqfs_compressor_config_t *cfg,
+ SQFS_COMPRESSOR id,
+ size_t block_size, char *options);
+
+void compressor_print_help(SQFS_COMPRESSOR id);
+
+/*
+ Create an liblzo2 based LZO compressor.
+
+ XXX: This must be in libcommon instead of libsquashfs for legal reasons.
+ */
+int lzo_compressor_create(const sqfs_compressor_config_t *cfg,
+ sqfs_compressor_t **out);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* COMPRESS_CLI_H */