Home
last modified time | relevance | path

Searched full:0 (Results 1 – 25 of 89) sorted by relevance

1234

/lz4-3.4.0-2.7.6/tests/
Dfuzzer.c111 static clock_t g_time = 0; in FUZ_displayUpdate()
127 unsigned nbBits = 0; in FUZ_highbit32()
128 if (v32==0) return 0; in FUZ_highbit32()
149 size_t pos = 0; in FUZ_fillCompressibleNoiseBuffer()
186 int nbBuff=0; in FUZ_AddressOverflow()
187 int highAddress = 0; in FUZ_AddressOverflow()
195 return 0; in FUZ_AddressOverflow()
198 buffers[0] = (char*)malloc(BLOCKSIZE_I134); in FUZ_AddressOverflow()
200 if ((!buffers[0]) || (!buffers[1])) { in FUZ_AddressOverflow()
201 free(buffers[0]); free(buffers[1]); in FUZ_AddressOverflow()
[all …]
Dfullbench.c71 #define ALL_COMPRESSORS 0
72 #define ALL_DECOMPRESSORS 0
92 #define PROGRESS(...) g_noPrompt ? 0 : DISPLAY(__VA_ARGS__)
100 static int g_pause = 0;
105 static int g_noPrompt = 0;
205 return LZ4_compress_fast(in, out, inSize, LZ4_compressBound(inSize), 0); in local_LZ4_compress_fast0()
225 return LZ4_compress_fast_extState(&LZ4_stream, in, out, inSize, LZ4_compressBound(inSize), 0); in local_LZ4_compress_fast_extState0()
230 return LZ4_compress_fast_continue(&LZ4_stream, in, out, inSize, LZ4_compressBound(inSize), 0); in local_LZ4_compress_fast_continue0()
337 if (result < 0) return result; in local_LZ4_decompress_safe_partial()
345 assert(inSize >= 0); in local_LZ4F_compressFrame()
[all …]
DcheckFrame.c63 # define DEBUG 0
80 static U32 no_prompt = 0;
82 static U32 use_pause = 0;
117 return 0; in createCResources()
130 LZ4F_errorCode_t nextToLoad = 0; in frameCheck()
131 size_t curblocksize = 0; in frameCheck()
132 int partialBlock = 0; in frameCheck()
137 size_t pos = 0; in frameCheck()
149 /* LZ4F_decompress returned 0 : starting new frame */ in frameCheck()
150 curblocksize = 0; in frameCheck()
[all …]
DcheckTag.c28 * checkTag validates tags of following format : v[0-9].[0-9].[0-9]{any}
34 * When they are compatible, it exists with a code 0.
44 * @return 1 if tag is compatible, 0 if not.
51 if (tagLength < 2) return 0; in validate()
52 if (tag[0] != 'v') return 0; in validate()
53 if (tagLength <= verLength) return 0; in validate()
55 if (strncmp(LZ4_VERSION_STRING, tag+1, verLength)) return 0; in validate()
62 const char* const exeName = argv[0]; in main()
74 return 0; in main()
Dframetest.c58 dstPtr[0] = (BYTE) value32; in FUZ_writeLE32()
68 #define LZ4F_MAGIC_SKIPPABLE_START 0x184D2A50U
90 static clock_t g_clockTime = 0;
96 static U32 no_prompt = 0;
98 static U32 use_pause = 0;
125 #define FUZ_RAND15BITS (FUZ_rand(seed) & 0x7FFF)
130 size_t pos = 0; in FUZ_fillCompressibleNoiseBuffer()
159 unsigned nbBits = 0; in FUZ_highbit()
160 if (v32==0) return 0; in FUZ_highbit()
184 int basicTests_error = 0; in basicTests()
[all …]
Ddatagencli.c44 #define SEED_DEFAULT 0
73 return 0; in usage()
87 programName = argv[0]; in main()
98 while (*argument!=0) in main()
106 size=0; in main()
107 while ((*argument>='0') && (*argument<='9')) in main()
110 size += *argument - '0'; in main()
120 seed=0; in main()
121 while ((*argument>='0') && (*argument<='9')) in main()
124 seed += *argument - '0'; in main()
[all …]
DroundTripTest.c67 for (pos=0; pos<buffSize; pos++) in checkBuffers()
83 unsigned const h32 = XXH32(refBuff, hashLength, 0); in select_clevel()
96 * If clevel==0, compression level is derived from srcBuff's content head bytes.
107 …int const selected_clevel = proposed_clevel < 0 ? -proposed_clevel : proposed_clevel; /* if leve… in roundTripTest()
110 CONTROL_MSG(cSize == 0, "Compression error !"); in roundTripTest()
113 CONTROL_MSG(dSize < 0, "Decompression detected an error !"); in roundTripTest()
154 if (r || !(statbuf.st_mode & S_IFREG)) return 0; /* No good... */ in getFileSize()
158 if (r || !S_ISREG(statbuf.st_mode)) return 0; /* No good... */ in getFileSize()
176 return 0; in isDirectory()
205 void* const buffer = malloc(fileSize + !fileSize /* avoid 0 */); in fileCheck()
[all …]
/lz4-3.4.0-2.7.6/examples/
DblockStreaming_ringBuffer.c50 LZ4_stream_t lz4Stream_body = { { 0 } }; in test_compress()
54 int inpOffset = 0; in test_compress()
61 if (0 == inpBytes) break; in test_compress()
66 …onst int cmpBytes = LZ4_compress_fast_continue(lz4Stream, inpPtr, cmpBuf, inpBytes, CMPBUFSIZE, 0); in test_compress()
67 if(cmpBytes <= 0) break; in test_compress()
74 if(inpOffset >= RING_BUFFER_BYTES - MESSAGE_MAX_BYTES) inpOffset = 0; in test_compress()
78 write_int32(outFp, 0); in test_compress()
85 int decOffset = 0; in test_decompress()
86 LZ4_streamDecode_t lz4StreamDecode_body = { { 0 } }; in test_decompress()
90 int cmpBytes = 0; in test_decompress()
[all …]
DHCStreaming_ringBuffer.c15 # pragma GCC diagnostic ignored "-Wmissing-braces" /* GCC bug 53119 : doesn't accept { 0 } as in…
43 assert(arrayBytes >= 0); in write_bin()
52 assert(arrayBytes >= 0); in read_bin()
59 LZ4_streamHC_t lz4Stream_body = { 0 }; in test_compress()
63 int inpOffset = 0; in test_compress()
70 if (0 == inpBytes) break; in test_compress()
76 if(cmpBytes <= 0) break; in test_compress()
84 inpOffset = 0; in test_compress()
88 write_int32(outFp, 0); in test_compress()
95 int decOffset = 0; in test_decompress()
[all …]
DblockStreaming_lineByLine.c47 int inpOffset = 0; in test_compress()
53 #if 0 in test_compress()
57 if (0 == inpBytes) break; in test_compress()
60 int inpBytes = 0; in test_compress()
69 if (cmpBytes <= 0) break; in test_compress()
75 if ((size_t)inpOffset >= ringBufferBytes - messageMaxBytes) inpOffset = 0; in test_compress()
78 write_uint16(outFp, 0); in test_compress()
95 int decOffset = 0; in test_decompress()
99 uint16_t cmpBytes = 0; in test_decompress()
102 if (cmpBytes == 0) break; in test_decompress()
[all …]
DblockStreaming_doubleBuffer.c45 int inpBufIndex = 0; in test_compress()
52 if(0 == inpBytes) { in test_compress()
60 if(cmpBytes <= 0) { in test_compress()
70 write_int(outFp, 0); in test_compress()
80 int decBufIndex = 0; in test_decompress()
82 LZ4_setStreamDecode(lz4StreamDecode, NULL, 0); in test_decompress()
86 int cmpBytes = 0; in test_decompress()
90 if(readCount0 != 1 || cmpBytes <= 0) { in test_decompress()
104 if(decBytes <= 0) { in test_decompress()
117 int result = 0; in compare()
[all …]
DframeCompress.c21 0 /* unknown content size */, 0 /* no dictID */ , LZ4F_noBlockChecksum },
22 0, /* compression level; 0 == default */
23 0, /* autoflush */
24 0, /* favor decompression speed */
25 { 0, 0, 0 }, /* reserved, must be set to 0 */
35 if (nbElt>0) assert(expectedSize / nbElt == eltSize); /* check overflow */ in safe_fwrite()
62 compressResult_t result = { 1, 0, 0 }; /* result for an error */ in compress_file_internal()
63 unsigned long long count_in = 0, count_out; in compress_file_internal()
85 if (readSize == 0) break; /* nothing left to read from input file */ in compress_file_internal()
118 result.error = 0; in compress_file_internal()
[all …]
DdictionaryRandomAccess.c76 if(0 == inpBytes) { in test_compress()
86 if(cmpBytes <= 0) { exit(1); } in test_compress()
118 if (length == 0) { return; } in test_decompress()
137 for (block = 0; block <= endBlock; ++block) { in test_decompress()
160 if(decBytes <= 0) { exit(5); } in test_decompress()
165 offset = 0; in test_decompress()
175 int result = 0; in compare()
177 while(0 == result) { in compare()
185 if(0 == r0 || 0 == r1) { in compare()
188 if(0 == result) { in compare()
[all …]
/lz4-3.4.0-2.7.6/build/VS2010/
Dlz4.sln31 {E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Debug|Win32.Build.0 = Debug|Win32
33 {E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Debug|x64.Build.0 = Debug|x64
35 {E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Release|Win32.Build.0 = Release|Win32
37 {E30329AC-0057-4FE0-8FDA-7F650D398C4C}.Release|x64.Build.0 = Release|x64
39 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.Build.0 = Debug|Win32
41 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.Build.0 = Debug|x64
43 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.Build.0 = Release|Win32
45 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.Build.0 = Release|x64
47 {9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.Build.0 = Debug|Win32
49 {9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.Build.0 = Debug|x64
[all …]
/lz4-3.4.0-2.7.6/build/VS2017/
Dlz4.sln33 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|Win32.Build.0 = Debug|Win32
35 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Debug|x64.Build.0 = Debug|x64
37 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|Win32.Build.0 = Release|Win32
39 {9800039D-4AAA-43A4-BB78-FEF6F4836927}.Release|x64.Build.0 = Release|x64
41 {9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|Win32.Build.0 = Debug|Win32
43 {9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Debug|x64.Build.0 = Debug|x64
45 {9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|Win32.Build.0 = Release|Win32
47 {9092C5CC-3E71-41B3-BF68-4A7BDD8A5476}.Release|x64.Build.0 = Release|x64
49 {18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|Win32.Build.0 = Debug|Win32
51 {18B9F1A7-9C66-4352-898B-30804DADE0FD}.Debug|x64.Build.0 = Debug|x64
[all …]
/lz4-3.4.0-2.7.6/programs/
Dlz4io.c70 #define _1BIT 0x01
71 #define _2BITS 0x03
72 #define _3BITS 0x07
73 #define _4BITS 0x0F
74 #define _8BITS 0xFF
77 #define LZ4IO_MAGICNUMBER 0x184D2204
78 #define LZ4IO_SKIPPABLE0 0x184D2A50
79 #define LZ4IO_SKIPPABLEMASK 0xFFFFFFF0
80 #define LEGACY_MAGICNUMBER 0x184C2102
95 static int g_displayLevel = 0; /* 0 : no display ; 1: errors ; 2 : + result + interaction + war…
[all …]
Dlz4-exe.rc.in2 FILEVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0
3 PRODUCTVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0
4 FILEFLAGSMASK 0
5 FILEOS 0x40000
14 VALUE "FileVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0"
19 VALUE "ProductVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0"
24 VALUE "Translation", 0x0409, 1200
Dutil.h103 #elif PLATFORM_POSIX_VERSION >= 0 /* Unix-like operating system */
108 # define SET_REALTIME_PRIORITY setpriority(PRIO_PROCESS, 0, -20)
114 # define UTIL_sleepMilli(milli) { struct timespec t; t.tv_sec=0; t.tv_nsec=milli*1000000ULL; n…
188 static int init = 0; in UTIL_getSpanTimeMicro()
199 static int init = 0; in UTIL_getSpanTimeNano()
216 static int init = 0; in UTIL_getSpanTimeMicro()
226 static int init = 0; in UTIL_getSpanTimeNano()
260 U64 micro = 0; in UTIL_getSpanTimeMicro()
268 U64 nano = 0; in UTIL_getSpanTimeNano()
303 } while (UTIL_getSpanTimeNano(clockStart, clockEnd) == 0); in UTIL_waitForNextTick()
[all …]
Dbench.c136 int const acceleration = (pThis->cLevel < 0) ? -pThis->cLevel + 1 : 1; in LZ4_compressBlockNoStream()
153 int const acceleration = (pThis->cLevel < 0) ? -pThis->cLevel + 1 : 1; in LZ4_compressBlockStream()
218 #define LZ4_isError(errcode) (errcode==0)
253 static U32 g_displayLevel = 2; /* 0 : no display; 1: errors; 2 : + result + interaction + war…
260 static clock_t g_time = 0;
267 # define DEBUG 0
284 static size_t g_blockSize = 0;
285 int g_additionalParam = 0;
286 int g_benchSeparately = 0;
300 void BMK_setBenchSeparately(int separate) { g_benchSeparately = (separate!=0); } in BMK_setBenchSeparately()
[all …]
/lz4-3.4.0-2.7.6/lib/
Dlz4.c41 * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()).
49 * Select "acceleration" for LZ4_compress_fast() when parameter value <= 0
67 * Method 0 (default) : use `memcpy()`. Safe and portable.
74 * Prefer these methods in priority order (0 > 1 > 2)
174 #define likely(expr) expect((expr) != 0, 1)
177 #define unlikely(expr) expect((expr) != 0, 0)
181 * it can be disabled by setting LZ4_ALIGN_TEST to 0 */
245 # define assert(condition) ((void)0)
266 return ((size_t)ptr & (alignment -1)) == 0; in LZ4_isAligned()
301 notLimited = 0,
[all …]
Dlz4frame.c58 * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()).
61 # define LZ4F_HEAPMODE 0
107 # define assert(condition) ((void)0)
150 U32 value32 = srcPtr[0]; in LZ4F_readLE32()
160 dstPtr[0] = (BYTE)value32; in LZ4F_writeLE32()
169 U64 value64 = srcPtr[0]; in LZ4F_readLE64()
183 dstPtr[0] = (BYTE)value64; in LZ4F_writeLE64()
203 #define _1BIT 0x01
204 #define _2BITS 0x03
205 #define _3BITS 0x07
[all …]
Dliblz4-dll.rc.in5 FILEVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0
6 PRODUCTVERSION @LIBVER_MAJOR@,@LIBVER_MINOR@,@LIBVER_PATCH@,0
11 FILEFLAGS 0
23 VALUE "FileVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0"
28 VALUE "ProductVersion", "@LIBVER_MAJOR@.@LIBVER_MINOR@.@LIBVER_PATCH@.0"
33 VALUE "Translation", 0x0409, 1200
/lz4-3.4.0-2.7.6/ossfuzz/
Dround_trip_stream_fuzzer.c46 cursor.pos = 0; in cursor_create()
66 state.data.pos = 0; in state_create()
96 LZ4_setStreamDecode(state->dstream, NULL, 0); in state_reset()
97 state->data.pos = 0; in state_reset()
98 state->compressed.pos = 0; in state_reset()
99 state->roundTrip.pos = 0; in state_reset()
109 FUZZ_ASSERT(dSize >= 0); in state_decompress()
129 size_t const dictSize = FUZZ_rand32(&state->seed, 0, maxDictSize); in state_trimDict()
131 FUZZ_ASSERT(state->data.pos == 0); in state_trimDict()
132 FUZZ_ASSERT(state->roundTrip.pos == 0); in state_trimDict()
[all …]
Ddecompress_frame_fuzzer.c24 if (dictSize == 0) in decompress()
39 dstCapacitySeed, 0, 4 * size); in LLVMFuzzerTestOneInput()
42 dictSizeSeed, 0, largeDictSize); in LLVMFuzzerTestOneInput()
55 memset(dict, 0, dictSize); in LLVMFuzzerTestOneInput()
59 memset(&opts, 0, sizeof(opts)); in LLVMFuzzerTestOneInput()
60 opts.stableDst = 0; in LLVMFuzzerTestOneInput()
61 decompress(dctx, dst, dstCapacity, data, size, NULL, 0, &opts); in LLVMFuzzerTestOneInput()
63 decompress(dctx, dst, dstCapacity, data, size, NULL, 0, &opts); in LLVMFuzzerTestOneInput()
64 opts.stableDst = 0; in LLVMFuzzerTestOneInput()
74 return 0; in LLVMFuzzerTestOneInput()
/lz4-3.4.0-2.7.6/contrib/gen_manual/
Dgen_manual.cpp46 s.erase(0, p); in trim()
93 if (line.substr(0,11) == "LZ4LIB_API ") line = line.substr(11); in print_line()
94 if (line.substr(0,12) == "LZ4FLIB_API ") line = line.substr(12); in print_line()
98 sout << line.substr(0, spos); in print_line()
117 cout << "usage: " << argv[0] << " [lz4_version] [input_file] [output_html]" << endl; in main()
139 for (linenum=0; (size_t)linenum < input.size(); linenum++) { in main()
143 if (line.substr(0,7) == "typedef" && line.find("{")!=string::npos) { in main()
146 for (l=0; l<lines.size(); l++) { in main()
178 if (!comments.empty()) comments[0] = line.substr(spos+3); in main()
180 …comments[comments.size()-1] = comments[comments.size()-1].substr(0, comments[comments.size()-1].fi… in main()
[all …]

1234