aectest.h
· 650 B · C
Исходник
#include <szlib.h>
#include <stdio.h>
int main() {
char input[241];
FILE *f = fopen("1725_0_1964.lrit", "rb");
fread(input, 241, 1, f);
fclose(f);
char *output[3463];
SZ_com_t params;
params.options_mask = SZ_ALLOW_K13_OPTION_MASK | SZ_MSB_OPTION_MASK | SZ_NN_OPTION_MASK | SZ_RAW_OPTION_MASK;
params.bits_per_pixel = 8;
params.pixels_per_block = 16;
params.pixels_per_scanline = 3463;
int destLen = 3463;
int x = SZ_BufftoBuffDecompress(output, &destLen, input, 241, ¶ms);
printf("Result: %d - %d\n", x, destLen);
f = fopen("1725_0_1964.decomp2", "wb");
fwrite(output, 3463, 1, f);
fclose(f);
return 0;
}
| 1 | #include <szlib.h> |
| 2 | #include <stdio.h> |
| 3 | |
| 4 | int 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, ¶ms); |
| 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 | } |