… | |
… | |
89 | * This is useful if you don't want to bother with the case of |
89 | * This is useful if you don't want to bother with the case of |
90 | * incompressible data and just want to provide a buffer that is |
90 | * incompressible data and just want to provide a buffer that is |
91 | * guaranteeed to be big enough. |
91 | * guaranteeed to be big enough. |
92 | * This macro can be used at preprocessing time. |
92 | * This macro can be used at preprocessing time. |
93 | */ |
93 | */ |
94 | #define LZF_MAX_COMPRESSED_SIZE(n) ((n) * 33 / 32 + 1) |
94 | #define LZF_MAX_COMPRESSED_SIZE(n) ((((n) * 33) >> 5 ) + 1) |
95 | |
95 | |
96 | /* |
96 | /* |
97 | * Decompress data compressed with some version of the lzf_compress |
97 | * Decompress data compressed with some version of the lzf_compress |
98 | * function and stored at location in_data and length in_len. The result |
98 | * function and stored at location in_data and length in_len. The result |
99 | * will be stored at out_data up to a maximum of out_len characters. |
99 | * will be stored at out_data up to a maximum of out_len characters. |