函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
static void ZSTD_refDDict(ZSTD_DCtx *dstDCtx, const ZSTD_DDict *ddict)
{
    ZSTD_decompressBegin(dstDCtx); /* init */
    if (ddict) {               /* support refDDict on NULL */
        dstDCtx->dictID = ddict->dictID;
        dstDCtx->base = ddict->dictContent;
        dstDCtx->vBase = ddict->dictContent;
        dstDCtx->dictEnd = (const BYTE *)ddict->dictContent + ddict->dictSize;
        dstDCtx->previousDstEnd = dstDCtx->dictEnd;
        if (ddict->entropyPresent) {
            dstDCtx->litEntropy = 1;
            dstDCtx->fseEntropy = 1;
            dstDCtx->LLTptr = ddict->entropy.LLTable;
            dstDCtx->MLTptr = ddict->entropy.MLTable;
            dstDCtx->OFTptr = ddict->entropy.OFTable;
            dstDCtx->HUFptr = ddict->entropy.hufTable;
            dstDCtx->entropy.rep[0] = ddict->entropy.rep[0];
            dstDCtx->entropy.rep[1] = ddict->entropy.rep[1];
            dstDCtx->entropy.rep[2] = ddict->entropy.rep[2];
        } else {
            dstDCtx->litEntropy = 0;
            dstDCtx->fseEntropy = 0;
        }
    }
}