Rizin
unix-like reverse engineering framework and cli tools
|
Compress in multi-call mode using LZMA2 in multi-threaded mode. More...
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <lzma.h>
Go to the source code of this file.
Functions | |
static bool | init_encoder (lzma_stream *strm) |
static bool | compress (lzma_stream *strm, FILE *infile, FILE *outfile) |
int | main (void) |
Compress in multi-call mode using LZMA2 in multi-threaded mode.
Usage: ./04_compress_easy_mt < INFILE > OUTFILE
Example: ./04_compress_easy_mt < foo > foo.xz
Definition in file 04_compress_easy_mt.c.
|
static |
Definition at line 118 of file 04_compress_easy_mt.c.
References test-lz4-speed::action, lzma_stream::avail_in, lzma_stream::avail_out, if(), inbuf, LZMA_DATA_ERROR, LZMA_FINISH, LZMA_MEM_ERROR, LZMA_OK, LZMA_RUN, LZMA_STREAM_END, msg, lzma_stream::next_in, lzma_stream::next_out, NULL, outbuf, outfile, and strm.
Referenced by main().
|
static |
Definition at line 26 of file 04_compress_easy_mt.c.
References lzma_mt::flags, LZMA_CHECK_CRC64, LZMA_MEM_ERROR, LZMA_OK, LZMA_OPTIONS_ERROR, LZMA_PRESET_DEFAULT, LZMA_UNSUPPORTED_CHECK, msg, NULL, strm, lzma_mt::threads, and threads_max.
Referenced by main().
int main | ( | void | ) |
Definition at line 190 of file 04_compress_easy_mt.c.
References compress(), init_encoder(), LZMA_STREAM_INIT, and strm.