Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 10 of 10) sorted by relevance

/lz4-3.4.0-2.7.6/ossfuzz/
Dround_trip_stream_fuzzer.c21 size_t pos; member
27 size_t pos; member
46 cursor.pos = 0; in cursor_create()
66 state.data.pos = 0; in state_create()
97 state->data.pos = 0; in state_reset()
98 state->compressed.pos = 0; in state_reset()
99 state->roundTrip.pos = 0; in state_reset()
105 char* dst = state->roundTrip.buf + state->roundTrip.pos; in state_decompress()
106 int const dstCapacity = state->roundTrip.size - state->roundTrip.pos; in state_decompress()
110 state->roundTrip.pos += dSize; in state_decompress()
[all …]
/lz4-3.4.0-2.7.6/programs/
Ddatagen.c106 size_t pos = prefixSize; in RDG_genBlock() local
114 if (buffSize < pos + size0) { in RDG_genBlock()
115 memset(buffPtr+pos, 0, buffSize-pos); in RDG_genBlock()
118 memset(buffPtr+pos, 0, size0); in RDG_genBlock()
119 pos += size0; in RDG_genBlock()
120 buffPtr[pos-1] = RDG_genChar(seed, lt); in RDG_genBlock()
124 if (pos==0) { in RDG_genBlock()
126 pos=1; in RDG_genBlock()
130 while (pos < buffSize) { in RDG_genBlock()
138 if (offset > pos) offset = (U32)pos; in RDG_genBlock()
[all …]
Dutil.h445 UTIL_STATIC int UTIL_prepareFileList(const char* dirName, char** bufStart, size_t* pos, char** bufE… in UTIL_prepareFileList() argument
482 …nbFiles += UTIL_prepareFileList(path, bufStart, pos, bufEnd); /* Recursively call "UTIL_prepareFi… in UTIL_prepareFileList()
486 if (*bufStart + *pos + pathLength >= *bufEnd) { in UTIL_prepareFileList()
492 if (*bufStart + *pos + pathLength < *bufEnd) { in UTIL_prepareFileList()
493 strncpy(*bufStart + *pos, path, *bufEnd - (*bufStart + *pos)); in UTIL_prepareFileList()
494 *pos += pathLength + 1; in UTIL_prepareFileList()
511 UTIL_STATIC int UTIL_prepareFileList(const char* dirName, char** bufStart, size_t* pos, char** bufE… in UTIL_prepareFileList() argument
540 …nbFiles += UTIL_prepareFileList(path, bufStart, pos, bufEnd); /* Recursively call "UTIL_prepareFi… in UTIL_prepareFileList()
543 if (*bufStart + *pos + pathLength >= *bufEnd) { in UTIL_prepareFileList()
549 if (*bufStart + *pos + pathLength < *bufEnd) { in UTIL_prepareFileList()
[all …]
Dbench.c488 U32 segNb, bNb, pos; in BMK_benchMem() local
495 pos = (U32)(u - bacc); in BMK_benchMem()
496 bNb = pos / (128 KB); in BMK_benchMem()
497 DISPLAY("(block %u, sub %u, pos %u) \n", segNb, bNb, pos); in BMK_benchMem()
586 size_t pos = 0, totalSize = 0; in BMK_loadFiles() local
599 if (fileSize > bufferSize-pos) { /* buffer too small - stop after this file */ in BMK_loadFiles()
600 fileSize = bufferSize-pos; in BMK_loadFiles()
603 { size_t const readSize = fread(((char*)buffer)+pos, 1, (size_t)fileSize, f); in BMK_loadFiles()
605 pos += readSize; } in BMK_loadFiles()
Dlz4io.c1071 size_t pos = 0; in LZ4IO_decompressLZ4F() local
1079 …while ((pos < readSize) || (decodedBytes == ress.dstBufferSize)) { /* still to read, or still to … in LZ4IO_decompressLZ4F()
1081 size_t remaining = readSize - pos; in LZ4IO_decompressLZ4F()
1083 …singDict(ress.dCtx, ress.dstBuffer, &decodedBytes, (char*)(ress.srcBuffer)+pos, &remaining, ress.d… in LZ4IO_decompressLZ4F()
1085 pos += remaining; in LZ4IO_decompressLZ4F()
/lz4-3.4.0-2.7.6/tests/
DcheckFrame.c137 size_t pos = 0; in frameCheck() local
146 while (pos < readSize) { /* still to read */ in frameCheck()
151 remaining = readSize - pos; in frameCheck()
152 … nextToLoad = LZ4F_getFrameInfo(ress.ctx, &frameInfo, (char*)(ress.srcBuffer)+pos, &remaining); in frameCheck()
159 pos += remaining; in frameCheck()
163 …decompress(ress.ctx, ress.dstBuffer, &decodedBytes, (char*)(ress.srcBuffer)+pos, &remaining, NULL); in frameCheck()
165 pos += remaining; in frameCheck()
169 if (nextToLoad > (readSize - pos)) { in frameCheck()
172 remaining = readSize - pos; in frameCheck()
179 …decompress(ress.ctx, ress.dstBuffer, &decodedBytes, (char*)(ress.srcBuffer)+pos, &remaining, NULL); in frameCheck()
[all …]
DroundTripTest.c65 size_t pos; in checkBuffers() local
67 for (pos=0; pos<buffSize; pos++) in checkBuffers()
68 if (ip1[pos]!=ip2[pos]) in checkBuffers()
71 return pos; in checkBuffers()
Dframetest.c130 size_t pos = 0; in FUZ_fillCompressibleNoiseBuffer() local
134 BBuffer[pos++] = (BYTE)(FUZ_rand(seed)); in FUZ_fillCompressibleNoiseBuffer()
136 while (pos < bufferSize) { in FUZ_fillCompressibleNoiseBuffer()
141 size_t const length = MIN(lengthRand, bufferSize - pos); in FUZ_fillCompressibleNoiseBuffer()
142 size_t const end = pos + length; in FUZ_fillCompressibleNoiseBuffer()
144 size_t const offset = MIN(offsetRand, pos); in FUZ_fillCompressibleNoiseBuffer()
145 size_t match = pos - offset; in FUZ_fillCompressibleNoiseBuffer()
146 while (pos < end) BBuffer[pos++] = BBuffer[match++]; in FUZ_fillCompressibleNoiseBuffer()
150 size_t const length = MIN(lengthRand, bufferSize - pos); in FUZ_fillCompressibleNoiseBuffer()
151 size_t const end = pos + length; in FUZ_fillCompressibleNoiseBuffer()
[all …]
Dfuzzer.c149 size_t pos = 0; in FUZ_fillCompressibleNoiseBuffer() local
153 while (pos < 20) in FUZ_fillCompressibleNoiseBuffer()
154 BBuffer[pos++] = (BYTE)(FUZ_rand(seed)); in FUZ_fillCompressibleNoiseBuffer()
156 while (pos < bufferSize) { in FUZ_fillCompressibleNoiseBuffer()
161 size_t const d = MIN(pos+length, bufferSize); in FUZ_fillCompressibleNoiseBuffer()
164 while (offset > pos) offset >>= 1; in FUZ_fillCompressibleNoiseBuffer()
165 match = pos - offset; in FUZ_fillCompressibleNoiseBuffer()
166 while (pos < d) BBuffer[pos++] = BBuffer[match++]; in FUZ_fillCompressibleNoiseBuffer()
170 size_t const d = MIN(pos+length, bufferSize); in FUZ_fillCompressibleNoiseBuffer()
171 while (pos < d) BBuffer[pos++] = (BYTE)(FUZ_rand(seed) >> 5); in FUZ_fillCompressibleNoiseBuffer()
[all …]
/lz4-3.4.0-2.7.6/lib/
Dlz4hc.c84 #define DELTANEXTU16(table, pos) table[(U16)(pos)] /* faster */ argument
321 int pos; in LZ4HC_InsertAndGetWiderMatch() local
322 for (pos = 0; pos < end; pos += step) { in LZ4HC_InsertAndGetWiderMatch()
323 U32 const candidateDist = DELTANEXTU16(chainTable, matchIndex + (U32)pos); in LZ4HC_InsertAndGetWiderMatch()
327 matchChainPos = (U32)pos; in LZ4HC_InsertAndGetWiderMatch()
482 U32 const pos = (start==NULL) ? 0 : (U32)(anchor - start); in LZ4HC_encodeSequence() local
490 pos, in LZ4HC_encodeSequence()
1457 int const pos = cur + litlen; in LZ4HC_compress_optimal() local
1458 if (price < opt[pos].price) { in LZ4HC_compress_optimal()
1459 opt[pos].mlen = 1; /* literal */ in LZ4HC_compress_optimal()
[all …]