12#ifndef __JFFS2_COMPR_H__
13#define __JFFS2_COMPR_H__
15#include <linux/kernel.h>
16#include <linux/vmalloc.h>
17#include <linux/list.h>
18#include <linux/types.h>
19#include <linux/string.h>
20#include <linux/slab.h>
21#include <linux/errno.h>
23#include <linux/jffs2.h>
24#include "jffs2_fs_i.h"
25#include "jffs2_fs_sb.h"
28#define JFFS2_RUBINMIPS_PRIORITY 10
29#define JFFS2_DYNRUBIN_PRIORITY 20
30#define JFFS2_LZARI_PRIORITY 30
31#define JFFS2_RTIME_PRIORITY 50
32#define JFFS2_ZLIB_PRIORITY 60
33#define JFFS2_LZO_PRIORITY 80
36#define JFFS2_RUBINMIPS_DISABLED
37#define JFFS2_DYNRUBIN_DISABLED
39#define JFFS2_COMPR_MODE_NONE 0
40#define JFFS2_COMPR_MODE_PRIORITY 1
41#define JFFS2_COMPR_MODE_SIZE 2
42#define JFFS2_COMPR_MODE_FAVOURLZO 3
43#define JFFS2_COMPR_MODE_FORCELZO 4
44#define JFFS2_COMPR_MODE_FORCEZLIB 5
46#define FAVOUR_LZO_PERCENT 80
53 int (*compress)(
unsigned char *data_in,
unsigned char *cpage_out,
54 uint32_t *srclen, uint32_t *destlen);
55 int (*decompress)(
unsigned char *cdata_in,
unsigned char *data_out,
56 uint32_t cdatalen, uint32_t datalen);
59 unsigned char *compr_buf;
60 uint32_t compr_buf_size;
61 uint32_t stat_compr_orig_size;
62 uint32_t stat_compr_new_size;
63 uint32_t stat_compr_blocks;
64 uint32_t stat_decompr_blocks;
70int jffs2_compressors_init(
void);
71int jffs2_compressors_exit(
void);
74 unsigned char *data_in,
unsigned char **cpage_out,
75 uint32_t *datalen, uint32_t *cdatalen);
78 uint16_t comprtype,
unsigned char *cdata_in,
79 unsigned char *data_out, uint32_t cdatalen, uint32_t datalen);
81#define jffs2_free_comprbuf(x, y) do { } while (0)
86#ifdef CONFIG_JFFS2_RUBIN
87int jffs2_rubinmips_init(
void);
88void jffs2_rubinmips_exit(
void);
89int jffs2_dynrubin_init(
void);
90void jffs2_dynrubin_exit(
void);
92#ifdef CONFIG_JFFS2_RTIME
93int jffs2_rtime_init(
void);
94void jffs2_rtime_exit(
void);
96#ifdef CONFIG_JFFS2_ZLIB
97int jffs2_zlib_init(
void);
98void jffs2_zlib_exit(
void);
100#ifdef CONFIG_JFFS2_LZO
101int jffs2_lzo_init(
void);
102void jffs2_lzo_exit(
void);
Definition: jffs2_fs_i.h:20
Definition: jffs2_fs_sb.h:51