aboutsummaryrefslogtreecommitdiff
path: root/include/linux/lz4k.h
diff options
context:
space:
mode:
authorMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
committerMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
commitd2e1446d81725c351dc73a03b397ce043fb18452 (patch)
tree4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/lz4k.h
downloadandroid_kernel_m2note-d2e1446d81725c351dc73a03b397ce043fb18452.tar.gz
first commit
Diffstat (limited to 'include/linux/lz4k.h')
-rw-r--r--include/linux/lz4k.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/lz4k.h b/include/linux/lz4k.h
new file mode 100644
index 000000000..e31c5042f
--- /dev/null
+++ b/include/linux/lz4k.h
@@ -0,0 +1,27 @@
+
+#ifndef __LZ4K_H__
+#define __LZ4K_H__
+
+#include <linux/types.h>
+#include <linux/lzo.h>
+
+#define LZ4K_TAG 1261722188 /* "LZ4K" */
+
+#ifndef CONFIG_64BIT
+#define LZ4K_MEM_COMPRESS LZO1X_MEM_COMPRESS
+#else
+#define LZ4K_MEM_COMPRESS (LZO1X_MEM_COMPRESS << 1)
+#endif
+
+int lz4k_compress(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
+int lz4k_decompress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len);
+
+#ifdef CONFIG_UBIFS_FS
+int lz4k_decompress_ubifs(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len);
+#endif /* CONFIG_UBIFS_FS */
+
+#endif /* __LZ4K_H__ */