79 msg =
"Memory allocation failed";
83 msg =
"Unsupported decompressor flags";
93 msg =
"Unknown error, possibly a bug";
97 fprintf(stderr,
"Error initializing the decoder: %s (error code %u)\n",
133 fprintf(stderr,
"%s: Read error: %s\n",
134 inname, strerror(errno));
154 fprintf(stderr,
"Write error: %s\n",
187 msg =
"Memory allocation failed";
192 msg =
"The input is not in the .xz format";
210 msg =
"Unsupported compression options";
214 msg =
"Compressed file is corrupt";
224 msg =
"Compressed file is truncated or "
230 msg =
"Unknown error, possibly a bug";
234 fprintf(stderr,
"%s: Decoder error: "
235 "%s (error code %u)\n",
247 fprintf(stderr,
"Usage: %s FILES...\n",
argv[0]);
256 for (
int i = 1;
i < argc; ++
i) {
267 fprintf(stderr,
"%s: Error opening the "
269 argv[
i], strerror(errno));
281 if (fclose(stdout)) {
282 fprintf(stderr,
"Write error: %s\n", strerror(errno));
286 return success ? EXIT_SUCCESS : EXIT_FAILURE;
int main(int argc, char **argv)
static bool decompress(lzma_stream *strm, const char *inname, FILE *infile, FILE *outfile)
static bool init_decoder(lzma_stream *strm)
#define LZMA_CONCATENATED
unsigned char outbuf[SIZE]
unsigned char inbuf[SIZE]
static static fork const void static count static fd const char const char static newpath char char argv
The public API of liblzma data compression library.
static struct sockaddr static addrlen static backlog const void msg
Passing data to and from liblzma.
if(dbg->bits==RZ_SYS_BITS_64)
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_DATA_ERROR
Data is corrupt.
@ LZMA_MEM_ERROR
Cannot allocate memory.
@ LZMA_FORMAT_ERROR
Memory usage limit was reached.
@ LZMA_STREAM_END
End of stream was reached.
@ LZMA_BUF_ERROR
No progress is possible.
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_FINISH
Finish the coding operation.
@ LZMA_RUN
Continue coding.
#define LZMA_STREAM_INIT
Initialization for lzma_stream.