44 fprintf(stderr,
"Unsupported preset, possibly a bug\n");
78 msg =
"Memory allocation failed";
85 msg =
"Specified filter chain is not supported";
89 msg =
"Specified integrity check is not supported";
93 msg =
"Unknown error, possibly a bug";
97 fprintf(stderr,
"Error initializing the encoder: %s (error code %u)\n",
124 fprintf(stderr,
"Read error: %s\n",
140 fprintf(stderr,
"Write error: %s\n",
156 msg =
"Memory allocation failed";
160 msg =
"File size limits exceeded";
164 msg =
"Unknown error, possibly a bug";
168 fprintf(stderr,
"Encoder error: %s (error code %u)\n",
187 if (fclose(stdout)) {
188 fprintf(stderr,
"Write error: %s\n", strerror(errno));
192 return success ? EXIT_SUCCESS : EXIT_FAILURE;
static bool compress(lzma_stream *strm, FILE *infile, FILE *outfile)
static bool init_encoder(lzma_stream *strm)
const lzma_filter * filters
#define LZMA_PRESET_DEFAULT
Default compression preset.
unsigned char outbuf[SIZE]
unsigned char inbuf[SIZE]
#define LZMA_FILTER_LZMA2
LZMA2 Filter ID.
The public API of liblzma data compression library.
static struct sockaddr static addrlen static backlog const void msg
Options specific to the LZMA1 and LZMA2 filters.
Passing data to and from liblzma.
#define LZMA_VLI_UNKNOWN
VLI value to denote that the value is unknown.
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_STREAM_END
End of stream was reached.
@ LZMA_UNSUPPORTED_CHECK
Cannot calculate the integrity check.
@ 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.