Последняя активность 1 month ago

Test decompress LritRice with libaec.

aectest.h Исходник
1#include <szlib.h>
2#include <stdio.h>
3
4int main() {
5
6 char input[241];
7 FILE *f = fopen("1725_0_1964.lrit", "rb");
8 fread(input, 241, 1, f);
9 fclose(f);
10
11 char *output[3463];
12
13 SZ_com_t params;
14 params.options_mask = SZ_ALLOW_K13_OPTION_MASK | SZ_MSB_OPTION_MASK | SZ_NN_OPTION_MASK | SZ_RAW_OPTION_MASK;
15 params.bits_per_pixel = 8;
16 params.pixels_per_block = 16;
17 params.pixels_per_scanline = 3463;
18
19 int destLen = 3463;
20
21 int x = SZ_BufftoBuffDecompress(output, &destLen, input, 241, &params);
22 printf("Result: %d - %d\n", x, destLen);
23
24 f = fopen("1725_0_1964.decomp2", "wb");
25 fwrite(output, 3463, 1, f);
26 fclose(f);
27 return 0;
28}