Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
Enumerations | |
enum | { BLOCK_BYTES = 1024 , DICTIONARY_BYTES = 1024 , MAX_BLOCKS = 1024 } |
Functions | |
void | write_int (FILE *fp, int i) |
void | write_bin (FILE *fp, const void *array, size_t arrayBytes) |
void | read_int (FILE *fp, int *i) |
size_t | read_bin (FILE *fp, void *array, size_t arrayBytes) |
void | seek_bin (FILE *fp, long offset, int origin) |
void | test_compress (FILE *outFp, FILE *inpFp, void *dict, int dictSize) |
void | test_decompress (FILE *outFp, FILE *inpFp, void *dict, int dictSize, int offset, int length) |
int | compare (FILE *fp0, FILE *fp1, int length) |
int | main (int argc, char *argv[]) |
Variables | |
const char | kTestMagic [] = { 'T', 'E', 'S', 'T' } |
Definition at line 14 of file dictionaryRandomAccess.c.
anonymous enum |
Enumerator | |
---|---|
BLOCK_BYTES | |
DICTIONARY_BYTES | |
MAX_BLOCKS |
Definition at line 16 of file dictionaryRandomAccess.c.
Definition at line 173 of file dictionaryRandomAccess.c.
References b1, int, length, MIN, r0, r1, and read_bin().
Referenced by main().
Definition at line 198 of file dictionaryRandomAccess.c.
References argv, BLOCK_BYTES, cmp(), compare(), DICTIONARY_BYTES, benchmark::FILE, int, length, printf(), read_bin(), seek_bin(), SEEK_SET, snprintf, test_compress(), and test_decompress().
Definition at line 45 of file dictionaryRandomAccess.c.
References test-lz4-list::exit, and read().
Referenced by compare(), main(), test_compress(), and test_decompress().
void read_int | ( | FILE * | fp, |
int * | i | ||
) |
Definition at line 40 of file dictionaryRandomAccess.c.
References test-lz4-list::exit, i, and read().
Referenced by test_decompress().
Definition at line 51 of file dictionaryRandomAccess.c.
References test-lz4-list::exit.
Referenced by main(), and test_decompress().
void test_compress | ( | FILE * | outFp, |
FILE * | inpFp, | ||
void * | dict, | ||
int | dictSize | ||
) |
Definition at line 56 of file dictionaryRandomAccess.c.
References BLOCK_BYTES, test-lz4-list::exit, int, kTestMagic, LZ4_compress_fast_continue(), LZ4_COMPRESSBOUND, LZ4_initStream(), LZ4_loadDict(), MAX_BLOCKS, read_bin(), write_bin(), and write_int().
Referenced by main().
void test_decompress | ( | FILE * | outFp, |
FILE * | inpFp, | ||
void * | dict, | ||
int | dictSize, | ||
int | offset, | ||
int | length | ||
) |
Definition at line 105 of file dictionaryRandomAccess.c.
References BLOCK_BYTES, test-lz4-list::exit, kTestMagic, length, LZ4_COMPRESSBOUND, LZ4_decompress_safe_continue(), LZ4_setStreamDecode(), MAX_BLOCKS, MIN, read(), read_bin(), read_int(), seek_bin(), SEEK_END, SEEK_SET, and write_bin().
Referenced by main().
Definition at line 35 of file dictionaryRandomAccess.c.
References test-lz4-list::exit.
Referenced by test_compress(), and test_decompress().
void write_int | ( | FILE * | fp, |
int | i | ||
) |
Definition at line 30 of file dictionaryRandomAccess.c.
References test-lz4-list::exit, and i.
Referenced by test_compress().
Magic bytes for this test case. This is not a great magic number because it is a common word in ASCII. However, it is important to have some versioning system in your format.
Definition at line 27 of file dictionaryRandomAccess.c.
Referenced by test_compress(), and test_decompress().