… | |
… | |
46 | ** |
46 | ** |
47 | ** This algorithm is believed to be patent-free. |
47 | ** This algorithm is believed to be patent-free. |
48 | ** |
48 | ** |
49 | ***********************************************************************/ |
49 | ***********************************************************************/ |
50 | |
50 | |
|
|
51 | #define LZF_VERSION 0x0105 /* 1.5 */ |
|
|
52 | |
51 | /* |
53 | /* |
52 | * Compress in_len bytes stored at the memory block starting at |
54 | * Compress in_len bytes stored at the memory block starting at |
53 | * in_data and write the result to out_data, up to a maximum length |
55 | * in_data and write the result to out_data, up to a maximum length |
54 | * of out_len bytes. |
56 | * of out_len bytes. |
55 | * |
57 | * |
… | |
… | |
58 | * be considerably larger than in_len, so it makes sense to always |
60 | * be considerably larger than in_len, so it makes sense to always |
59 | * use out_len == in_len - 1), to ensure _some_ compression, and store |
61 | * use out_len == in_len - 1), to ensure _some_ compression, and store |
60 | * the data uncompressed otherwise. |
62 | * the data uncompressed otherwise. |
61 | * |
63 | * |
62 | * lzf_compress might use different algorithms on different systems and |
64 | * lzf_compress might use different algorithms on different systems and |
63 | * thus might result in different compressed strings depending on the |
65 | * even diferent runs, thus might result in different compressed strings |
64 | * phase of the moon or similar factors. However, all these strings are |
66 | * depending on the phase of the moon or similar factors. However, all |
65 | * architecture-independent and will result in the original data when |
67 | * these strings are architecture-independent and will result in the |
66 | * decompressed using lzf_decompress. |
68 | * original data when decompressed using lzf_decompress. |
67 | * |
69 | * |
68 | * The buffers must not be overlapping. |
70 | * The buffers must not be overlapping. |
69 | * |
71 | * |
70 | * If the option LZF_STATE_ARG is enabled, an extra argument must be |
72 | * If the option LZF_STATE_ARG is enabled, an extra argument must be |
71 | * supplied which is not reflected in this header file. Refer to lzf_c.c. |
73 | * supplied which is not reflected in this header file. Refer to lzfP.h |
|
|
74 | * and lzf_c.c. |
72 | * |
75 | * |
73 | */ |
76 | */ |
74 | unsigned int |
77 | unsigned int |
75 | lzf_compress (const void *const in_data, unsigned int in_len, |
78 | lzf_compress (const void *const in_data, unsigned int in_len, |
76 | void *out_data, unsigned int out_len); |
79 | void *out_data, unsigned int out_len); |