|
1 | 1 | #include "stdafx.h" |
2 | 2 | #include "lzo_compressor.h" |
| 3 | +#include "rt_lzo1x.h" |
3 | 4 |
|
4 | | -int lzo_compress_dict(const lzo_bytep in, lzo_uint in_len, |
5 | | - lzo_bytep out, lzo_uintp out_len, |
6 | | - lzo_voidp wrkmem, |
7 | | - const lzo_bytep dict, lzo_uint dict_len) |
| 5 | +int lzo_compress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize, |
| 6 | + void *workMem, const void *dict, u32 dictSize) |
8 | 7 | { |
9 | | - return lzo1x_999_compress_dict(in, in_len, out, out_len, wrkmem, dict, dict_len); |
| 8 | + return lzo1x_999_compress_dict((lzo_bytep)input, inputSize, (lzo_bytep)output, (lzo_uintp)&outputSize, |
| 9 | + workMem, (lzo_bytep)dict, dictSize); |
10 | 10 | } |
11 | 11 |
|
12 | | -int lzo_decompress_dict(const lzo_bytep in, lzo_uint in_len, |
13 | | - lzo_bytep out, lzo_uintp out_len, |
14 | | - lzo_voidp wrkmem /* NOT USED */, |
15 | | - const lzo_bytep dict, lzo_uint dict_len) |
| 12 | +int lzo_decompress_dict(const void *input, u32 inputSize, void *output, u32 &outputSize, |
| 13 | + void *workMem, const void *dict, u32 dictSize) |
16 | 14 | { |
17 | | - return lzo1x_decompress_dict_safe(in, in_len, out, out_len, wrkmem, dict, dict_len); |
| 15 | + return lzo1x_decompress_dict_safe((lzo_bytep)input, inputSize, (lzo_bytep)output, (lzo_uintp)&outputSize, |
| 16 | + workMem, (lzo_bytep)dict, dictSize); |
18 | 17 | } |
19 | 18 |
|
20 | 19 | int lzo_initialize() |
21 | | -{ |
22 | | - return lzo_init(); |
23 | | -} |
| 20 | +{ return lzo_init(); } |
24 | 21 |
|
| 22 | +u32 lzo_get_workmem_size() |
| 23 | +{ return LZO1X_999_MEM_COMPRESS; } |
0 commit comments