Rizin
unix-like reverse engineering framework and cli tools
|
Compress from stdin to stdout in multi-call 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 void | show_usage_and_exit (const char *argv0) |
static uint32_t | get_preset (int argc, char **argv) |
static bool | init_encoder (lzma_stream *strm, uint32_t preset) |
static bool | compress (lzma_stream *strm, FILE *infile, FILE *outfile) |
int | main (int argc, char **argv) |
Compress from stdin to stdout in multi-call mode.
Usage: ./01_compress_easy PRESET < INFILE > OUTFILE
Example: ./01_compress_easy 6 < foo > foo.xz
Definition in file 01_compress_easy.c.
|
static |
Definition at line 108 of file 01_compress_easy.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().
Definition at line 37 of file 01_compress_easy.c.
References argv, LZMA_PRESET_EXTREME, preset, and show_usage_and_exit().
Referenced by main().
|
static |
Definition at line 60 of file 01_compress_easy.c.
References LZMA_CHECK_CRC64, LZMA_MEM_ERROR, LZMA_OK, LZMA_OPTIONS_ERROR, LZMA_UNSUPPORTED_CHECK, msg, preset, and strm.
Referenced by main().
Definition at line 263 of file 01_compress_easy.c.
References argv, compress(), get_preset(), init_encoder(), LZMA_STREAM_INIT, preset, and strm.
|
static |
Definition at line 26 of file 01_compress_easy.c.
References test-lz4-list::exit.
Referenced by get_preset().