2 * Test application to test buffer-to-buffer decoding
4 * Author: Lasse Collin <lasse.collin@tukaani.org>
6 * This file has been put into the public domain.
7 * You can do whatever you want with this file.
15 #define BUFFER_SIZE (1024 * 1024)
17 static uint8_t in[BUFFER_SIZE];
18 static uint8_t out[BUFFER_SIZE];
28 s = xz_dec_init(XZ_SINGLE, 0);
30 fputs("Initialization failed", stderr);
36 b.in_size = fread(in, 1, sizeof(in), stdin);
39 b.out_size = sizeof(out);
41 ret = xz_dec_run(s, &b);
44 fwrite(out, 1, b.out_pos, stdout);
45 fprintf(stderr, "%d\n", ret);