Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <lz4frame.h>
Go to the source code of this file.
Classes | |
struct | compressResult_t |
Macros | |
#define | IN_CHUNK_SIZE (16*1024) |
Functions | |
static void | safe_fwrite (void *buf, size_t eltSize, size_t nbElt, FILE *f) |
static compressResult_t | compress_file_internal (FILE *f_in, FILE *f_out, LZ4F_compressionContext_t ctx, void *inBuff, size_t inChunkSize, void *outBuff, size_t outCapacity) |
static compressResult_t | compress_file (FILE *f_in, FILE *f_out) |
static size_t | get_block_size (const LZ4F_frameInfo_t *info) |
static int | decompress_file_internal (FILE *f_in, FILE *f_out, LZ4F_dctx *dctx, void *src, size_t srcCapacity, size_t filled, size_t alreadyConsumed, void *dst, size_t dstCapacity) |
static int | decompress_file_allocDst (FILE *f_in, FILE *f_out, LZ4F_dctx *dctx, void *src, size_t srcCapacity) |
static int | decompress_file (FILE *f_in, FILE *f_out) |
int | compareFiles (FILE *fp0, FILE *fp1) |
int | main (int argc, const char **argv) |
Variables | |
static const LZ4F_preferences_t | kPrefs |
#define IN_CHUNK_SIZE (16*1024) |
Definition at line 17 of file frameCompress.c.
int compareFiles | ( | FILE * | fp0, |
FILE * | fp1 | ||
) |
|
static |
Definition at line 123 of file frameCompress.c.
References assert(), compress_file_internal(), free(), IN_CHUNK_SIZE, kPrefs, LZ4F_compressBound(), LZ4F_createCompressionContext(), LZ4F_freeCompressionContext(), LZ4F_isError(), LZ4F_VERSION, malloc(), NULL, printf(), and src.
Referenced by main().
|
static |
Definition at line 57 of file frameCompress.c.
References assert(), compressedSize, compressResult_t::error, IN_CHUNK_SIZE, kPrefs, LZ4F_compressBegin(), LZ4F_compressBound(), LZ4F_compressEnd(), LZ4F_compressUpdate(), LZ4F_HEADER_SIZE_MAX, LZ4F_isError(), NULL, printf(), safe_fwrite(), compressResult_t::size_in, and compressResult_t::size_out.
Referenced by compress_file().
|
static |
Definition at line 285 of file frameCompress.c.
References assert(), decompress_file_allocDst(), free(), IN_CHUNK_SIZE, LZ4F_createDecompressionContext(), LZ4F_freeDecompressionContext(), LZ4F_getErrorName(), LZ4F_isError(), LZ4F_VERSION, malloc(), NULL, printf(), and src.
Referenced by main().
|
static |
Definition at line 242 of file frameCompress.c.
References assert(), decompress_file_internal(), dst, free(), get_block_size(), info(), LZ4F_getErrorName(), LZ4F_getFrameInfo(), LZ4F_HEADER_SIZE_MAX, LZ4F_isError(), malloc(), NULL, printf(), and src.
Referenced by decompress_file().
|
static |
Definition at line 171 of file frameCompress.c.
References assert(), dst, LZ4F_decompress(), LZ4F_getErrorName(), LZ4F_isError(), NULL, printf(), safe_fwrite(), src, and srcSize.
Referenced by decompress_file_allocDst().
|
static |
Definition at line 156 of file frameCompress.c.
References test-lz4-list::exit, info(), LZ4F_default, LZ4F_max1MB, LZ4F_max256KB, LZ4F_max4MB, LZ4F_max64KB, and printf().
Referenced by decompress_file_allocDst().
Definition at line 327 of file frameCompress.c.
References argv, cmp(), compareFiles(), compress_file(), decompress_file(), compressResult_t::error, benchmark::FILE, printf(), compressResult_t::size_in, compressResult_t::size_out, and snprintf.
Definition at line 31 of file frameCompress.c.
References assert(), test-lz4-list::exit, and f.
Referenced by compress_file_internal(), and decompress_file_internal().
|
static |
Definition at line 19 of file frameCompress.c.
Referenced by compress_file(), and compress_file_internal().