Linux Kernel
3.7.1
|
Go to the source code of this file.
Functions | |
void | ubifs_compress (const void *in_buf, int in_len, void *out_buf, int *out_len, int *compr_type) |
int | ubifs_decompress (const void *in_buf, int in_len, void *out_buf, int *out_len, int compr_type) |
int __init | ubifs_compressors_init (void) |
void | ubifs_compressors_exit (void) |
Variables | |
struct ubifs_compressor * | ubifs_compressors [UBIFS_COMPR_TYPES_CNT] |
void ubifs_compress | ( | const void * | in_buf, |
int | in_len, | ||
void * | out_buf, | ||
int * | out_len, | ||
int * | compr_type | ||
) |
ubifs_compress - compress data. : data to compress : length of the data to compress : output buffer where compressed data should be stored : output buffer length is returned here : type of compression to use on enter, actually used compression type on exit
This function compresses input buffer of length and stores the result in the output buffer and the resulting length in . If the input buffer does not compress, it is just copied to the . The same happens if is UBIFS_COMPR_NONE or if compression error occurred.
Note, if the input buffer was not compressed, it is copied to the output buffer and UBIFS_COMPR_NONE is returned in .
Definition at line 95 of file compress.c.
ubifs_compressors_exit - de-initialize UBIFS compressors.
Definition at line 246 of file compress.c.
ubifs_compressors_init - initialize UBIFS compressors.
This function initializes the compressor which were compiled in. Returns zero in case of success and a negative error code in case of failure.
Definition at line 223 of file compress.c.
int ubifs_decompress | ( | const void * | in_buf, |
int | in_len, | ||
void * | out_buf, | ||
int * | out_len, | ||
int | compr_type | ||
) |
ubifs_decompress - decompress data. : data to decompress : length of the data to decompress : output buffer where decompressed data should : output length is returned here : type of compression
This function decompresses data from buffer into buffer . The length of the uncompressed data is returned in . This functions returns %0 on success or a negative error code on failure.
Definition at line 147 of file compress.c.
struct ubifs_compressor* ubifs_compressors[UBIFS_COMPR_TYPES_CNT] |
Definition at line 75 of file compress.c.