函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:lib\zstd\compress.c Create Date:2022-07-27 08:03:03
首页 Copyright©Brick

2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
/** ZSTD_compress_insertDictionary() :
*   @return : 0, or an error code */
static size_t ZSTD_compress_insertDictionary(ZSTD_CCtx *cctx, const void *dict, size_t dictSize)
{
    if ((dict == NULL) || (dictSize <= 8))
        return 0;
 
    /* dict as pure content */
    if ((ZSTD_readLE32(dict) != ZSTD_DICT_MAGIC) || (cctx->forceRawDict))
        return ZSTD_loadDictionaryContent(cctx, dict, dictSize);
 
    /* dict as zstd dictionary */
    return ZSTD_loadZstdDictionary(cctx, dict, dictSize);
}