/external/lz4/examples/ |
D | dictionaryRandomAccess.c | 56 void test_compress(FILE* outFp, FILE* inpFp, void *dict, int dictSize) in test_compress() argument 75 const int inpBytes = (int) read_bin(inpFp, inpBuf, BLOCK_BYTES); in test_compress() 105 void test_decompress(FILE* outFp, FILE* inpFp, void *dict, int dictSize, int offset, int length) in test_decompress() argument 123 size_t read = read_bin(inpFp, magic, sizeof(magic)); in test_decompress() 133 seek_bin(inpFp, -4, SEEK_END); in test_decompress() 134 read_int(inpFp, &numOffsets); in test_decompress() 136 seek_bin(inpFp, -4 * (numOffsets + 1), SEEK_END); in test_decompress() 138 read_int(inpFp, offsetsPtr++); in test_decompress() 142 seek_bin(inpFp, offsets[currentBlock], SEEK_SET); in test_decompress() 151 const size_t read = read_bin(inpFp, cmpBuf, (size_t)cmpBytes); in test_decompress() [all …]
|
D | blockStreaming_lineByLine.c | 39 FILE* inpFp, in test_compress() argument 56 const int inpBytes = (int) read_bin(inpFp, inpPtr, randomLength); in test_compress() 61 if (!fgets(inpPtr, (int) messageMaxBytes, inpFp)) in test_compress() 88 FILE* inpFp, in test_decompress() argument 101 if (read_uint16(inpFp, &cmpBytes) != 1) break; in test_decompress() 103 if (read_bin(inpFp, cmpBuf, cmpBytes) != cmpBytes) break; in test_decompress() 175 FILE* inpFp = fopen(inpFilename, "rb"); in main() local 178 test_compress(outFp, inpFp, MESSAGE_MAX_BYTES, RING_BUFFER_BYTES); in main() 181 fclose(inpFp); in main() 186 FILE* inpFp = fopen(lz4Filename, "rb"); in main() local [all …]
|
D | blockStreaming_doubleBuffer.c | 39 void test_compress(FILE* outFp, FILE* inpFp) in test_compress() argument 51 const int inpBytes = (int) read_bin(inpFp, inpPtr, BLOCK_BYTES); in test_compress() 74 void test_decompress(FILE* outFp, FILE* inpFp) in test_decompress() argument 89 const size_t readCount0 = read_int(inpFp, &cmpBytes); in test_decompress() 94 const size_t readCount1 = read_bin(inpFp, cmpBuf, (size_t) cmpBytes); in test_decompress() 160 FILE* inpFp = fopen(inpFilename, "rb"); in main() local 164 test_compress(outFp, inpFp); in main() 168 fclose(inpFp); in main() 173 FILE* inpFp = fopen(lz4Filename, "rb"); in main() local 177 test_decompress(outFp, inpFp); in main() [all …]
|
D | blockStreaming_ringBuffer.c | 51 void test_compress(FILE* outFp, FILE* inpFp) in test_compress() argument 63 const int inpBytes = (int) read_bin(inpFp, inpPtr, randomLength); in test_compress() 85 void test_decompress(FILE* outFp, FILE* inpFp) in test_decompress() argument 97 const size_t r0 = read_int32(inpFp, &cmpBytes); in test_decompress() 100 const size_t r1 = read_bin(inpFp, cmpBuf, cmpBytes); in test_decompress() 164 FILE* inpFp = fopen(inpFilename, "rb"); in main() local 167 test_compress(outFp, inpFp); in main() 170 fclose(inpFp); in main() 175 FILE* inpFp = fopen(lz4Filename, "rb"); in main() local 178 test_decompress(outFp, inpFp); in main() [all …]
|
D | HCStreaming_ringBuffer.c | 54 void test_compress(FILE* outFp, FILE* inpFp) in test_compress() argument 66 const int inpBytes = (int) read_bin(inpFp, inpPtr, randomLength); in test_compress() 89 void test_decompress(FILE* outFp, FILE* inpFp) in test_decompress() argument 100 { const size_t r0 = read_int32(inpFp, &cmpBytes); in test_decompress() 105 r1 = read_bin(inpFp, cmpBuf, cmpBytes); in test_decompress() 188 { FILE* const inpFp = fopen(inpFilename, "rb"); in main() local 191 test_compress(outFp, inpFp); in main() 194 fclose(inpFp); in main() 198 { FILE* const inpFp = fopen(lz4Filename, "rb"); in main() local 201 test_decompress(outFp, inpFp); in main() [all …]
|
D | frameCompress.c | 258 { FILE* const inpFp = fopen(inpFilename, "rb"); in main() local 265 ret = compress_file(inpFp, outFp, &sizeIn, &sizeOut); in main() 276 fclose(inpFp); in main() 280 { FILE* const inpFp = fopen(lz4Filename, "rb"); in main() local 285 ret = decompress_file(inpFp, outFp); in main() 293 fclose(inpFp); in main() 297 { FILE* const inpFp = fopen(inpFilename, "rb"); in main() local 301 const int cmp = compare(inpFp, decFp); in main() 309 fclose(inpFp); in main()
|