/external/zstd/tests/fuzz/ |
D | zstd_helpers.c | 24 static void set(ZSTD_CCtx *cctx, ZSTD_cParameter param, int value) in set() argument 26 FUZZ_ZASSERT(ZSTD_CCtx_setParameter(cctx, param, value)); in set() 29 static void setRand(ZSTD_CCtx *cctx, ZSTD_cParameter param, unsigned min, in setRand() argument 32 set(cctx, param, value); in setRand() 68 void FUZZ_setRandomParameters(ZSTD_CCtx *cctx, size_t srcSize, FUZZ_dataProducer_t *producer) in FUZZ_setRandomParameters() argument 71 set(cctx, ZSTD_c_windowLog, cParams.windowLog); in FUZZ_setRandomParameters() 72 set(cctx, ZSTD_c_hashLog, cParams.hashLog); in FUZZ_setRandomParameters() 73 set(cctx, ZSTD_c_chainLog, cParams.chainLog); in FUZZ_setRandomParameters() 74 set(cctx, ZSTD_c_searchLog, cParams.searchLog); in FUZZ_setRandomParameters() 75 set(cctx, ZSTD_c_minMatch, cParams.minMatch); in FUZZ_setRandomParameters() [all …]
|
D | dictionary_stream_round_trip.c | 26 ZSTD_CCtx *cctx = NULL; variable 65 ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); in compress() 66 FUZZ_setRandomParameters(cctx, srcSize, producer); in compress() 69 FUZZ_ZASSERT(ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 0)); in compress() 72 cctx, dict, dictSize, in compress() 76 cctx, dict, dictSize, in compress() 93 ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_flush); in compress() 101 ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_end); in compress() 105 ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); in compress() 108 FUZZ_setRandomParameters(cctx, remaining, producer); in compress() [all …]
|
D | simple_round_trip.c | 26 static ZSTD_CCtx *cctx = NULL; variable 38 FUZZ_setRandomParameters(cctx, srcSize, producer); in roundTripTest() 39 cSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest() 40 FUZZ_ZASSERT(ZSTD_CCtx_getParameter(cctx, ZSTD_c_targetCBlockSize, &targetCBlockSize)); in roundTripTest() 45 cctx, compressed, compressedCapacity, src, srcSize, cLevel); in roundTripTest() 57 FUZZ_ZASSERT(ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetCBlockSize, 0)); in roundTripTest() 58 normalCSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest() 94 if (!cctx) { in LLVMFuzzerTestOneInput() 95 cctx = ZSTD_createCCtx(); in LLVMFuzzerTestOneInput() 96 FUZZ_ASSERT(cctx); in LLVMFuzzerTestOneInput() [all …]
|
D | stream_round_trip.c | 26 ZSTD_CCtx *cctx = NULL; variable 63 ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); in compress() 64 FUZZ_setRandomParameters(cctx, srcSize, producer); in compress() 79 ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_flush); in compress() 87 ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_end); in compress() 91 ZSTD_CCtx_reset(cctx, ZSTD_reset_session_only); in compress() 94 FUZZ_setRandomParameters(cctx, remaining, producer); in compress() 103 … size_t const ret = ZSTD_compressStream2(cctx, &nullOut, &nullIn, ZSTD_e_continue); in compress() 109 ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_continue); in compress() 122 size_t const ret = ZSTD_compressStream2(cctx, &out, &in, ZSTD_e_end); in compress() [all …]
|
D | dictionary_round_trip.c | 25 static ZSTD_CCtx *cctx = NULL; variable 40 cSize = ZSTD_compress_usingDict(cctx, in roundTripTest() 47 FUZZ_setRandomParameters(cctx, srcSize, producer); in roundTripTest() 49 FUZZ_ZASSERT(ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 0)); in roundTripTest() 52 cctx, dict.buff, dict.size, in roundTripTest() 56 cctx, dict.buff, dict.size, in roundTripTest() 59 cSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest() 97 if (!cctx) { in LLVMFuzzerTestOneInput() 98 cctx = ZSTD_createCCtx(); in LLVMFuzzerTestOneInput() 99 FUZZ_ASSERT(cctx); in LLVMFuzzerTestOneInput() [all …]
|
D | raw_dictionary_round_trip.c | 25 static ZSTD_CCtx *cctx = NULL; variable 38 FUZZ_setRandomParameters(cctx, srcSize, producer); in roundTripTest() 40 FUZZ_ZASSERT(ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 0)); in roundTripTest() 43 cctx, dict, dictSize, in roundTripTest() 47 cctx, dict, dictSize, in roundTripTest() 50 cSize = ZSTD_compress2(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest() 91 if (!cctx) { in LLVMFuzzerTestOneInput() 92 cctx = ZSTD_createCCtx(); in LLVMFuzzerTestOneInput() 93 FUZZ_ASSERT(cctx); in LLVMFuzzerTestOneInput() 111 ZSTD_freeCCtx(cctx); cctx = NULL; in LLVMFuzzerTestOneInput()
|
D | simple_compress.c | 26 static ZSTD_CCtx *cctx = NULL; variable 40 if (!cctx) { in LLVMFuzzerTestOneInput() 41 cctx = ZSTD_createCCtx(); in LLVMFuzzerTestOneInput() 42 FUZZ_ASSERT(cctx); in LLVMFuzzerTestOneInput() 46 size_t const ret = ZSTD_compressCCtx(cctx, rBuf, bufSize, src, size, cLevel); in LLVMFuzzerTestOneInput() 53 ZSTD_freeCCtx(cctx); cctx = NULL; in LLVMFuzzerTestOneInput()
|
D | decompress_dstSize_tooSmall.c | 26 static ZSTD_CCtx *cctx = NULL; variable 42 if (!cctx) { in LLVMFuzzerTestOneInput() 43 cctx = ZSTD_createCCtx(); in LLVMFuzzerTestOneInput() 44 FUZZ_ASSERT(cctx); in LLVMFuzzerTestOneInput() 53 size_t const cSize = ZSTD_compressCCtx(cctx, cBuf, cBufSize, src, size, 1); in LLVMFuzzerTestOneInput() 66 ZSTD_freeCCtx(cctx); cctx = NULL; in LLVMFuzzerTestOneInput()
|
D | block_round_trip.c | 27 static ZSTD_CCtx *cctx = NULL; variable 39 size_t ret = ZSTD_compressBegin_advanced(cctx, NULL, 0, params, srcSize); in roundTripTest() 42 ret = ZSTD_compressBlock(cctx, compressed, compressedCapacity, src, srcSize); in roundTripTest() 76 if (!cctx) { in LLVMFuzzerTestOneInput() 77 cctx = ZSTD_createCCtx(); in LLVMFuzzerTestOneInput() 78 FUZZ_ASSERT(cctx); in LLVMFuzzerTestOneInput() 95 ZSTD_freeCCtx(cctx); cctx = NULL; in LLVMFuzzerTestOneInput()
|
D | sequence_compression_api.c | 29 static ZSTD_CCtx *cctx = NULL; variable 197 ZSTD_CCtx_reset(cctx, ZSTD_reset_session_and_parameters); in roundTripTest() 198 ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, 0); in roundTripTest() 199 ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, cLevel); in roundTripTest() 200 ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, wLog); in roundTripTest() 201 ZSTD_CCtx_setParameter(cctx, ZSTD_c_minMatch, ZSTD_MINMATCH_MIN); in roundTripTest() 202 ZSTD_CCtx_setParameter(cctx, ZSTD_c_validateSequences, 1); in roundTripTest() 204 ZSTD_CCtx_setParameter(cctx, ZSTD_c_blockDelimiters, ZSTD_sf_noBlockDelimiters); in roundTripTest() 206 FUZZ_ZASSERT(ZSTD_CCtx_loadDictionary(cctx, dict, dictSize)); in roundTripTest() 210 cSize = ZSTD_compressSequences(cctx, compressed, compressedCapacity, in roundTripTest() [all …]
|
D | dictionary_loader.c | 34 ZSTD_CCtx* cctx = ZSTD_createCCtx(); in compress() local 37 cctx, dict, dictSize, dictContentType)); in compress() 40 cctx, dict, dictSize, dictLoadMethod, dictContentType)); in compress() 42 cctx, compressed, compressedCapacity, source, sourceSize); in compress() 43 ZSTD_freeCCtx(cctx); in compress()
|
/external/zstd/tests/ |
D | fuzzer.c | 210 ZSTD_CCtx* const cctx = ZSTD_createCCtx_advanced(cMem); in FUZ_mallocTests_internal() local 211 … CHECK_Z( ZSTD_compressCCtx(cctx, outBuffer, outSize, inBuffer, inSize, compressionLevel) ); in FUZ_mallocTests_internal() 212 ZSTD_freeCCtx(cctx); in FUZ_mallocTests_internal() 242 ZSTD_CCtx* const cctx = ZSTD_createCCtx_advanced(cMem); in FUZ_mallocTests_internal() local 243 CHECK_Z( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, compressionLevel) ); in FUZ_mallocTests_internal() 244 CHECK_Z( ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads) ); in FUZ_mallocTests_internal() 245 CHECK_Z( ZSTD_compress2(cctx, outBuffer, outSize, inBuffer, inSize) ); in FUZ_mallocTests_internal() 246 ZSTD_freeCCtx(cctx); in FUZ_mallocTests_internal() 260 ZSTD_CCtx* const cctx = ZSTD_createCCtx_advanced(cMem); in FUZ_mallocTests_internal() local 263 CHECK_Z( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, compressionLevel) ); in FUZ_mallocTests_internal() [all …]
|
D | bigdict.c | 22 compress(ZSTD_CCtx* cctx, ZSTD_DCtx* dctx, in compress() argument 34 rc = ZSTD_compressStream2(cctx, &out, &in, end); in compress() 65 ZSTD_CCtx* cctx = ZSTD_createCCtx(); in main() local 76 if (!buffer || !out || !roundtrip || !cctx || !dctx) { in main() 81 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, 31))) in main() 83 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, 1))) in main() 85 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, ZSTD_c_overlapLog, 9))) in main() 87 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1))) in main() 89 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, ZSTD_btopt))) in main() 91 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, ZSTD_c_targetLength, 7))) in main() [all …]
|
/external/zstd/lib/compress/ |
D | zstd_compress.c | 82 static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager) in ZSTD_initCCtx() argument 84 assert(cctx != NULL); in ZSTD_initCCtx() 85 ZSTD_memset(cctx, 0, sizeof(*cctx)); in ZSTD_initCCtx() 86 cctx->customMem = memManager; in ZSTD_initCCtx() 87 cctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid()); in ZSTD_initCCtx() 88 { size_t const err = ZSTD_CCtx_reset(cctx, ZSTD_reset_parameters); in ZSTD_initCCtx() 99 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced() local 100 if (!cctx) return NULL; in ZSTD_createCCtx_advanced() 101 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced() 102 return cctx; in ZSTD_createCCtx_advanced() [all …]
|
/external/zstd/lib/ |
D | zstd.h | 202 ZSTDLIB_API size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx); 212 ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx, 466 ZSTDLIB_API size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value); 483 ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize); 505 ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset); 517 ZSTDLIB_API size_t ZSTD_compress2( ZSTD_CCtx* cctx, 706 ZSTDLIB_API size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, 863 ZSTDLIB_API size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx, 945 ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize); 959 ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); [all …]
|
/external/zstd/examples/ |
D | streaming_compression.c | 34 ZSTD_CCtx* const cctx = ZSTD_createCCtx(); in compressFile_orDie() local 35 CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); in compressFile_orDie() 40 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, cLevel) ); in compressFile_orDie() 41 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); in compressFile_orDie() 42 ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, 4); in compressFile_orDie() 69 size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); in compressFile_orDie() 86 ZSTD_freeCCtx(cctx); in compressFile_orDie()
|
D | multiple_streaming_compression.c | 28 ZSTD_CCtx* cctx; member 38 ress.cctx = ZSTD_createCCtx(); in createResources_orDie() 39 CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); in createResources_orDie() 45 CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_compressionLevel, cLevel) ); in createResources_orDie() 46 CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_checksumFlag, 1) ); in createResources_orDie() 52 ZSTD_freeCCtx(ress.cctx); in freeResources() 67 CHECK_ZSTD( ZSTD_CCtx_reset(ress.cctx, ZSTD_reset_session_only) ); in compressFile_orDie() 82 size_t const remaining = ZSTD_compressStream2(ress.cctx, &output, &input, mode); in compressFile_orDie()
|
D | streaming_memory_usage.c | 84 ZSTD_CCtx* const cctx = ZSTD_createCCtx(); in main() local 85 CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); in main() 86 CHECK_ZSTD( ZSTD_CCtx_setParametersUsingCCtxParams(cctx, cctxParams) ); in main() 91 CHECK_ZSTD( ZSTD_compressStream(cctx, &outBuff, &inBuff) ); in main() 92 size_t const remaining = ZSTD_endStream(cctx, &outBuff); in main() 116 size_t const cstreamSize = ZSTD_sizeof_CStream(cctx); in main() 132 ZSTD_freeCCtx(cctx); in main()
|
D | streaming_compression_thread_pool.c | 46 ZSTD_CCtx* const cctx = ZSTD_createCCtx(); in compressFile_orDie() local 47 CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); in compressFile_orDie() 50 size_t r = ZSTD_CCtx_refThreadPool(cctx, args->pool); in compressFile_orDie() 57 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, args->cLevel) ); in compressFile_orDie() 58 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); in compressFile_orDie() 59 ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, 16); in compressFile_orDie() 86 size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); in compressFile_orDie() 105 ZSTD_freeCCtx(cctx); in compressFile_orDie()
|
D | multiple_simple_compression.c | 22 ZSTD_CCtx* cctx; member 52 ress.cctx = ZSTD_createCCtx(); in createResources_orDie() 53 CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); in createResources_orDie() 61 ZSTD_freeCCtx(ress.cctx); /* never fails */ in freeResources() 74 …size_t const cSize = ZSTD_compressCCtx(ress.cctx, ress.cBuffer, ress.cBufferSize, ress.fBuffer, fS… in compressFile_orDie()
|
/external/zstd/tests/regression/ |
D | results.csv | 19 silesia, level -5, compress cctx, … 20 silesia, level -3, compress cctx, … 21 silesia, level -1, compress cctx, … 22 silesia, level 0, compress cctx, … 23 silesia, level 1, compress cctx, … 24 silesia, level 3, compress cctx, … 25 silesia, level 4, compress cctx, … 26 silesia, level 5, compress cctx, … 27 silesia, level 6, compress cctx, … 28 silesia, level 7, compress cctx, … [all …]
|
D | method.c | 157 ZSTD_CCtx* cctx = ZSTD_createCCtx(); in compress_cctx_compress() local 159 if (cctx == NULL || dctx == NULL) { in compress_cctx_compress() 173 cctx, in compress_cctx_compress() 183 cctx, in compress_cctx_compress() 193 cctx, in compress_cctx_compress() 235 ZSTD_freeCCtx(cctx); in compress_cctx_compress() 305 ZSTD_CCtx* cctx, in advanced_config() argument 308 ZSTD_CCtx_reset(cctx, ZSTD_reset_session_and_parameters); in advanced_config() 311 if (ZSTD_isError(ZSTD_CCtx_setParameter(cctx, pv.param, pv.value))) { in advanced_config() 317 cctx, state->dictionary.data, state->dictionary.size))) { in advanced_config() [all …]
|
/external/openssh/ |
D | mux.c | 339 struct mux_session_confirm_ctx *cctx; in mux_master_process_new_session() local 345 cctx = xcalloc(1, sizeof(*cctx)); in mux_master_process_new_session() 346 cctx->term = NULL; in mux_master_process_new_session() 347 cctx->rid = rid; in mux_master_process_new_session() 349 cctx->env = NULL; in mux_master_process_new_session() 352 (r = sshbuf_get_u32(m, &cctx->want_tty)) != 0 || in mux_master_process_new_session() 353 (r = sshbuf_get_u32(m, &cctx->want_x_fwd)) != 0 || in mux_master_process_new_session() 354 (r = sshbuf_get_u32(m, &cctx->want_agent_fwd)) != 0 || in mux_master_process_new_session() 355 (r = sshbuf_get_u32(m, &cctx->want_subsys)) != 0 || in mux_master_process_new_session() 357 (r = sshbuf_get_cstring(m, &cctx->term, NULL)) != 0 || in mux_master_process_new_session() [all …]
|
/external/zstd/lib/deprecated/ |
D | zbuff.h | 73 ZBUFF_DEPRECATED("use ZSTD_freeCStream") size_t ZBUFF_freeCCtx(ZBUFF_CCtx* cctx); 75 ZBUFF_DEPRECATED("use ZSTD_initCStream") size_t ZBUFF_compressInit(ZBUFF_CCtx* cctx, int … 76 …D_initCStream_usingDict") size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* cctx, const void* dict, … 78 ZBUFF_DEPRECATED("use ZSTD_compressStream") size_t ZBUFF_compressContinue(ZBUFF_CCtx* cctx, void* d… 79 ZBUFF_DEPRECATED("use ZSTD_flushStream") size_t ZBUFF_compressFlush(ZBUFF_CCtx* cctx, void* dst,… 80 ZBUFF_DEPRECATED("use ZSTD_endStream") size_t ZBUFF_compressEnd(ZBUFF_CCtx* cctx, void* dst, s…
|
/external/lz4/lib/ |
D | lz4frame.h | 248 LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx); 272 LZ4FLIB_API size_t LZ4F_compressBegin(LZ4F_cctx* cctx, 304 LZ4FLIB_API size_t LZ4F_compressUpdate(LZ4F_cctx* cctx, 318 LZ4FLIB_API size_t LZ4F_flush(LZ4F_cctx* cctx, 332 LZ4FLIB_API size_t LZ4F_compressEnd(LZ4F_cctx* cctx, 579 LZ4F_cctx* cctx, 594 LZ4F_cctx* cctx,
|