Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

From: Maninder Singh
Date: Thu Mar 22 2018 - 00:28:47 EST


CC: Vaneet Narang.

Â
OnÂ(03/21/18Â10:10),ÂManinderÂSinghÂwrote:
>ÂdiffÂ--gitÂa/lib/lz4/lz4_compress.cÂb/lib/lz4/lz4_compress.c
>ÂindexÂcc7b6d4..185c358Â100644
>Â---Âa/lib/lz4/lz4_compress.c
>Â+++Âb/lib/lz4/lz4_compress.c
>Â@@Â-183,7Â+183,8Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂconstÂtableType_tÂtableType,
>ÂÂÂÂÂÂÂÂÂÂconstÂdict_directiveÂdict,
>ÂÂÂÂÂÂÂÂÂÂconstÂdictIssue_directiveÂdictIssue,
>Â-ÂÂÂÂÂÂÂÂconstÂU32Âacceleration)
>Â+ÂÂÂÂÂÂÂÂconstÂU32Âacceleration,
>Â+ÂÂÂÂÂÂÂÂconstÂDynamic_OffsetÂdynOffset)
>ÂÂ{
>ÂÂÂÂÂÂÂÂÂÂconstÂBYTEÂ*ipÂ=Â(constÂBYTEÂ*)Âsource;
>ÂÂÂÂÂÂÂÂÂÂconstÂBYTEÂ*base;
>Â@@Â-199,6Â+200,7Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_compress_generic(
>
>ÂÂÂÂÂÂÂÂÂÂBYTEÂ*opÂ=Â(BYTEÂ*)Âdest;
>ÂÂÂÂÂÂÂÂÂÂBYTEÂ*ÂconstÂolimitÂ=ÂopÂ+ÂmaxOutputSize;
>Â+ÂÂÂÂÂÂÂÂintÂmax_distanceÂ=ÂdynOffsetÂ?ÂMAX_DISTANCE_DYNÂ:ÂMAX_DISTANCE;
Â
LetsÂmarkÂthisÂvariableÂ`const`.ÂIfÂtheÂcompilerÂdoesn'tÂrealizeÂthatÂthis
variableÂandÂ`dynOffset`ÂareÂcompileÂtimeÂconstants,ÂIÂexpectÂtheÂspeedÂto
beÂimpacted.
Â
>
>ÂÂÂÂÂÂÂÂÂÂU32ÂforwardH;
>ÂÂÂÂÂÂÂÂÂÂsize_tÂrefDeltaÂ=Â0;
>Â@@Â-245,6Â+247,7Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂforÂ(Â;Â;Â)Â{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂconstÂBYTEÂ*match;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂBYTEÂ*token;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂintÂcurr_offset;
>
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*ÂFindÂaÂmatchÂ*/
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ{
>Â@@Â-285,7Â+288,7Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:Â0)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ||Â((tableTypeÂ==ÂbyU16)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ?Â0
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:Â(matchÂ+ÂMAX_DISTANCEÂ<Âip))
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ:Â(matchÂ+Âmax_distanceÂ<Âip))
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ||Â(LZ4_read32(matchÂ+ÂrefDelta)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ!=ÂLZ4_read32(ip)));
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>Â@@Â-328,8Â+331,26Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_compress_generic(
>
>ÂÂ_next_match:
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*ÂEncodeÂOffsetÂ*/
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂLZ4_writeLE16(op,Â(U16)(ipÂ-Âmatch));
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂopÂ+=Â2;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(dynOffset)Â{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcurr_offsetÂ=Â(U16)(ipÂ-Âmatch);
>Â+
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*ÂIfÂOfssetÂisÂgreaterÂthanÂ127,ÂweÂneedÂ2Âbytes
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*ÂtoÂstoreÂit.ÂOtherwiseÂ1ÂbyteÂisÂenough.
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*/
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(curr_offsetÂ>Â127)Â{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcurr_offsetÂ=Â(curr_offsetÂ<<Â1)Â|ÂDYN_BIT;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂLZ4_writeLE16(op,Â(U16)curr_offset);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂopÂ+=Â2;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcurr_offsetÂ=Âcurr_offsetÂ<<Â1;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*opÂ=Â(BYTE)curr_offset;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂop++;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
Â
TheÂstandardÂwayÂtoÂdoÂvariableÂsizedÂintegersÂisÂtoÂuseÂtheÂhigh-bitÂas
theÂcontrolÂbit,ÂnotÂtheÂlow-bit.ÂDoÂyouÂhaveÂbenchmarksÂtoÂshowÂthatÂusing
theÂlow-bitÂisÂfasterÂthanÂusingÂtheÂhigh-bit?ÂIfÂso,ÂletsÂcommentÂinÂthe
code,ÂifÂnotÂletsÂuseÂtheÂhigh-bit.
Â
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂLZ4_writeLE16(op,Â(U16)(ipÂ-Âmatch));
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂopÂ+=Â2;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*ÂEncodeÂMatchLengthÂ*/
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ{
>Â@@Â-480,39Â+501,70Â@@ÂstaticÂintÂLZ4_compress_fast_extState(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_generic(ctx,Âsource,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdest,ÂinputSize,Â0,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoLimit,ÂbyU16,ÂnoDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂelse
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_generic(ctx,Âsource,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdest,ÂinputSize,Â0,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoLimit,ÂtableType,ÂnoDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(inputSizeÂ<ÂLZ4_64Klimit)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_generic(ctx,Âsource,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂbyU16,ÂnoDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂelse
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_generic(ctx,Âsource,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂtableType,ÂnoDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂ}
>ÂÂ}
>
>Â+staticÂintÂLZ4_compress_fast_extState_dynamic(
>Â+ÂÂÂÂÂÂÂÂvoidÂ*state,
>Â+ÂÂÂÂÂÂÂÂconstÂcharÂ*source,
>Â+ÂÂÂÂÂÂÂÂcharÂ*dest,
>Â+ÂÂÂÂÂÂÂÂintÂinputSize,
>Â+ÂÂÂÂÂÂÂÂintÂmaxOutputSize,
>Â+ÂÂÂÂÂÂÂÂintÂacceleration)
>Â+{
>Â+ÂÂÂÂÂÂÂÂLZ4_stream_t_internalÂ*ctxÂ=Â&((LZ4_stream_tÂ*)state)->internal_donotuse;
>Â+
>Â+ÂÂÂÂÂÂÂÂLZ4_resetStream((LZ4_stream_tÂ*)state);
>Â+
>Â+ÂÂÂÂÂÂÂÂifÂ(accelerationÂ<Â1)
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂaccelerationÂ=ÂLZ4_ACCELERATION_DEFAULT;
>Â+
>Â+ÂÂÂÂÂÂÂÂifÂ(maxOutputSizeÂ>=ÂLZ4_COMPRESSBOUND(inputSize))
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_generic(ctx,Âsource,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdest,ÂinputSize,Â0,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoLimit,ÂbyU16,ÂnoDict,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration,ÂDynOffset);
>Â+ÂÂÂÂÂÂÂÂelse
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_generic(ctx,Âsource,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdest,ÂinputSize,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂbyU16,ÂnoDict,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDictIssue,Âacceleration,ÂDynOffset);
>Â+}
>Â+
>ÂÂintÂLZ4_compress_fast(constÂcharÂ*source,ÂcharÂ*dest,ÂintÂinputSize,
>Â-ÂÂÂÂÂÂÂÂintÂmaxOutputSize,ÂintÂacceleration,ÂvoidÂ*wrkmem)
>Â+ÂÂÂÂÂÂÂÂintÂmaxOutputSize,ÂintÂacceleration,ÂvoidÂ*wrkmem,ÂboolÂdynOffset)
>ÂÂ{
>Â-ÂÂÂÂÂÂÂÂreturnÂLZ4_compress_fast_extState(wrkmem,Âsource,Âdest,ÂinputSize,
>Â+ÂÂÂÂÂÂÂÂifÂ(!dynOffset)
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_fast_extState(wrkmem,Âsource,Âdest,ÂinputSize,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,Âacceleration);
>Â+
>Â+ÂÂÂÂÂÂÂÂreturnÂLZ4_compress_fast_extState_dynamic(wrkmem,Âsource,Âdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,Âacceleration);
>ÂÂ}
>ÂÂEXPORT_SYMBOL(LZ4_compress_fast);
>
>ÂÂintÂLZ4_compress_default(constÂcharÂ*source,ÂcharÂ*dest,ÂintÂinputSize,
>Â-ÂÂÂÂÂÂÂÂintÂmaxOutputSize,ÂvoidÂ*wrkmem)
>Â+ÂÂÂÂÂÂÂÂintÂmaxOutputSize,ÂvoidÂ*wrkmem,ÂboolÂdynOffset)
>ÂÂ{
>ÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_compress_fast(source,Âdest,ÂinputSize,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂLZ4_ACCELERATION_DEFAULT,Âwrkmem);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂLZ4_ACCELERATION_DEFAULT,Âwrkmem,ÂdynOffset);
>ÂÂ}
>ÂÂEXPORT_SYMBOL(LZ4_compress_default);
>
>Â@@Â-900,12Â+952,12Â@@ÂintÂLZ4_compress_fast_continue(LZ4_stream_tÂ*LZ4_stream,ÂconstÂcharÂ*source,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresultÂ=ÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr,Âsource,Âdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂbyU32,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂwithPrefix64k,ÂdictSmall,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂwithPrefix64k,ÂdictSmall,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresultÂ=ÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr,Âsource,Âdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂbyU32,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂwithPrefix64k,ÂnoDictIssue,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂwithPrefix64k,ÂnoDictIssue,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr->dictSizeÂ+=Â(U32)inputSize;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr->currentOffsetÂ+=Â(U32)inputSize;
>Â@@Â-921,12Â+973,12Â@@ÂintÂLZ4_compress_fast_continue(LZ4_stream_tÂ*LZ4_stream,ÂconstÂcharÂ*source,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresultÂ=ÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr,Âsource,Âdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂbyU32,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,ÂdictSmall,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,ÂdictSmall,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresultÂ=ÂLZ4_compress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr,Âsource,Âdest,ÂinputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,ÂlimitedOutput,ÂbyU32,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,ÂnoDictIssue,Âacceleration);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,ÂnoDictIssue,Âacceleration,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr->dictionaryÂ=Â(constÂBYTEÂ*)source;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂstreamPtr->dictSizeÂ=Â(U32)inputSize;
>ÂdiffÂ--gitÂa/lib/lz4/lz4_decompress.cÂb/lib/lz4/lz4_decompress.c
>ÂindexÂ141734d..337a828Â100644
>Â---Âa/lib/lz4/lz4_decompress.c
>Â+++Âb/lib/lz4/lz4_decompress.c
>Â@@Â-71,7Â+71,9Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_decompress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂ/*ÂonlyÂifÂdictÂ==ÂusingExtDictÂ*/
>ÂÂÂÂÂÂÂÂÂÂÂconstÂBYTEÂ*ÂconstÂdictStart,
>ÂÂÂÂÂÂÂÂÂÂÂ/*ÂnoteÂ:Â=Â0ÂifÂnoDictÂ*/
>Â-ÂÂÂÂÂÂÂÂÂconstÂsize_tÂdictSize
>Â+ÂÂÂÂÂÂÂÂÂconstÂsize_tÂdictSize,
>Â+ÂÂÂÂÂÂÂÂÂ/*ÂoffsetÂ==Â1;ÂdynamicÂoffsetÂ*/
>Â+ÂÂÂÂÂÂÂÂÂconstÂDynamic_OffsetÂdynOffset
>ÂÂÂÂÂÂÂÂÂÂÂ)
>ÂÂ{
>ÂÂÂÂÂÂÂÂÂÂ/*ÂLocalÂVariablesÂ*/
>Â@@Â-141,8Â+143,8Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_decompress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*ÂcopyÂliteralsÂ*/
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcpyÂ=ÂopÂ+Âlength;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(((endOnInput)Â&&Â((cpyÂ>Â(partialDecodingÂ?ÂoexitÂ:ÂoendÂ-ÂMFLIMIT))
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ||Â(ipÂ+ÂlengthÂ>ÂiendÂ-Â(2Â+Â1Â+ÂLASTLITERALS))))
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ||Â((!endOnInput)Â&&Â(cpyÂ>ÂoendÂ-ÂWILDCOPYLENGTH)))Â{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ||Â(ipÂ+ÂlengthÂ>ÂiendÂ-Â(2Â+ÂLASTLITERALS))))
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ||Â((!endOnInput)Â&&Â(cpyÂ>ÂoendÂ-ÂWILDCOPYLENGTHÂ-Â1)))Â{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(partialDecoding)Â{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(cpyÂ>Âoend)Â{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*
>Â@@Â-188,13Â+190,31Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_decompress_generic(
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂbreak;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂLZ4_wildCopy(op,Âip,Âcpy);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(dynOffsetÂ&&ÂlengthÂ<Â4)
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂLZ4_copy4(op,Âip);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂelse
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂLZ4_wildCopy(op,Âip,Âcpy);
>Â+
Â
TheÂLZ4ÂformatÂenforcesÂthatÂtheÂlastÂ5ÂbytesÂareÂliteralsÂsoÂthat
LZ4_wildCopy()ÂcanÂbeÂusedÂhere.ÂIÂsuspectÂthatÂhavingÂthisÂextraÂbranch
hereÂforÂ`dynOffset`ÂmodeÂhurtsÂdecompressionÂspeed.
Â
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂipÂ+=Âlength;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂopÂ=Âcpy;
>
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*ÂgetÂoffsetÂ*/
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂoffsetÂ=ÂLZ4_readLE16(ip);
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂipÂ+=Â2;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(dynOffset)Â{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*ÂCheckÂifÂDYN_BITÂisÂset,ÂmeansÂ2ÂByteÂOffset,
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*ÂelseÂ1ÂByteÂOffset.
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ*/
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(*ipÂ&ÂDYN_BIT)Â{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂoffsetÂ=ÂLZ4_readLE16(ip)Â>>Â1;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂipÂ+=Â2;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂoffsetÂ=Â*ipÂ>>Â1;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂipÂ+=Â1;
Â
IfÂweÂuseÂtheÂhigh-bitÂasÂtheÂcontrolÂbit,ÂthisÂbranchÂsimplyÂbecomes
`offsetÂ=Â*ip`,ÂthoughÂtheÂlongÂoffsetÂbranchÂbecomesÂaÂbitÂlonger.
Â
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}ÂelseÂ{
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂoffsetÂ=ÂLZ4_readLE16(ip);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂipÂ+=Â2;
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ}
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmatchÂ=ÂopÂ-Âoffset;
>
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ((checkOffset)Â&&Â(unlikely(matchÂ<ÂlowLimit)))Â{
>Â@@Â-335,11Â+355,11Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_decompress_generic(
>ÂÂ}
>
>ÂÂintÂLZ4_decompress_safe(constÂcharÂ*source,ÂcharÂ*dest,
>Â-ÂÂÂÂÂÂÂÂintÂcompressedSize,ÂintÂmaxDecompressedSize)
>Â+ÂÂÂÂÂÂÂÂintÂcompressedSize,ÂintÂmaxDecompressedSize,ÂboolÂdynOffset)
>ÂÂ{
>ÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,ÂcompressedSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxDecompressedSize,ÂendOnInputSize,Âfull,Â0,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDict,Â(BYTEÂ*)dest,ÂNULL,Â0);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDict,Â(BYTEÂ*)dest,ÂNULL,Â0,ÂdynOffset);
Â
You'llÂneedÂtoÂuseÂtheÂsameÂtrickÂthatÂLZ4_compress_fast()Âuses,ÂbyÂhard
codingÂ`dynOffset`.ÂWeÂwantÂtheÂcompilerÂtoÂgenerateÂtooÂversionÂof
LZ4_decompress_generic(),ÂoneÂwithÂ`dynOffset`ÂandÂoneÂwithÂ`!dynOffset`.
ThatÂwayÂtheÂtightÂloopÂwon'tÂtheÂbranchesÂthatÂcheckÂ`dynOffset`.
Â
ÂÂÂÂÂÂÂÂifÂ(dynOffset)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(...,Âtrue);
ÂÂÂÂÂÂÂÂelse
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(...,Âfalse);
Â
WithoutÂthisÂtrick,ÂIÂexpectÂthatÂthisÂpatchÂcausesÂaÂregressionÂtoÂboth
LZ4ÂandÂLZ4_DYNÂdecompressionÂspeed.
Â
>ÂÂ}
>
>ÂÂintÂLZ4_decompress_safe_partial(constÂcharÂ*source,ÂcharÂ*dest,
>Â@@Â-347,14Â+367,14Â@@ÂintÂLZ4_decompress_safe_partial(constÂcharÂ*source,ÂcharÂ*dest,
>ÂÂ{
>ÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,ÂcompressedSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxDecompressedSize,ÂendOnInputSize,Âpartial,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂtargetOutputSize,ÂnoDict,Â(BYTEÂ*)dest,ÂNULL,Â0);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂtargetOutputSize,ÂnoDict,Â(BYTEÂ*)dest,ÂNULL,Â0,ÂNoDynOffset);
>ÂÂ}
>
>ÂÂintÂLZ4_decompress_fast(constÂcharÂ*source,ÂcharÂ*dest,ÂintÂoriginalSize)
>ÂÂ{
>ÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,Â0,ÂoriginalSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂendOnOutputSize,Âfull,Â0,ÂwithPrefix64k,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(BYTEÂ*)(destÂ-Â64Â*ÂKB),ÂNULL,Â64Â*ÂKB);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(BYTEÂ*)(destÂ-Â64Â*ÂKB),ÂNULL,Â64Â*ÂKB,ÂNoDynOffset);
>ÂÂ}
>
>ÂÂintÂLZ4_setStreamDecode(LZ4_streamDecode_tÂ*LZ4_streamDecode,
>Â@@Â-392,7Â+412,7Â@@ÂintÂLZ4_decompress_safe_continue(LZ4_streamDecode_tÂ*LZ4_streamDecode,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂendOnInputSize,Âfull,Â0,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,Âlz4sd->prefixEndÂ-Âlz4sd->prefixSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->extDictSize);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->extDictSize,ÂNoDynOffset);
>
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(resultÂ<=Â0)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂresult;
>Â@@Â-406,7Â+426,7Â@@ÂintÂLZ4_decompress_safe_continue(LZ4_streamDecode_tÂ*LZ4_streamDecode,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcompressedSize,ÂmaxOutputSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂendOnInputSize,Âfull,Â0,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,Â(BYTEÂ*)dest,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,Âlz4sd->extDictSize);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,Âlz4sd->extDictSize,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(resultÂ<=Â0)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂresult;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->prefixSizeÂ=Âresult;
>Â@@Â-427,7Â+447,7Â@@ÂintÂLZ4_decompress_fast_continue(LZ4_streamDecode_tÂ*LZ4_streamDecode,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂendOnOutputSize,Âfull,Â0,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->prefixEndÂ-Âlz4sd->prefixSize,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,Âlz4sd->extDictSize);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,Âlz4sd->extDictSize,ÂNoDynOffset);
>
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(resultÂ<=Â0)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂresult;
>Â@@Â-440,7Â+460,7Â@@ÂintÂLZ4_decompress_fast_continue(LZ4_streamDecode_tÂ*LZ4_streamDecode,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresultÂ=ÂLZ4_decompress_generic(source,Âdest,Â0,ÂoriginalSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂendOnOutputSize,Âfull,Â0,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂusingExtDict,Â(BYTEÂ*)dest,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,Âlz4sd->extDictSize);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->externalDict,Âlz4sd->extDictSize,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(resultÂ<=Â0)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂresult;
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂlz4sd->prefixSizeÂ=ÂoriginalSize;
>Â@@Â-463,19Â+483,19Â@@ÂstaticÂFORCE_INLINEÂintÂLZ4_decompress_usingDict_generic(constÂcharÂ*source,
>ÂÂÂÂÂÂÂÂÂÂifÂ(dictSizeÂ==Â0)
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcompressedSize,ÂmaxOutputSize,Âsafe,Âfull,Â0,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDict,Â(BYTEÂ*)dest,ÂNULL,Â0);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂnoDict,Â(BYTEÂ*)dest,ÂNULL,Â0,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂifÂ(dictStartÂ+ÂdictSizeÂ==Âdest)Â{
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(dictSizeÂ>=Â(int)(64Â*ÂKBÂ-Â1))
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂcompressedSize,ÂmaxOutputSize,Âsafe,Âfull,Â0,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂwithPrefix64k,Â(BYTEÂ*)destÂ-Â64Â*ÂKB,ÂNULL,Â0);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂwithPrefix64k,Â(BYTEÂ*)destÂ-Â64Â*ÂKB,ÂNULL,Â0,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,ÂcompressedSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,Âsafe,Âfull,Â0,ÂnoDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(BYTEÂ*)destÂ-ÂdictSize,ÂNULL,Â0);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(BYTEÂ*)destÂ-ÂdictSize,ÂNULL,Â0,ÂNoDynOffset);
>ÂÂÂÂÂÂÂÂÂÂ}
>ÂÂÂÂÂÂÂÂÂÂreturnÂLZ4_decompress_generic(source,Âdest,ÂcompressedSize,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂmaxOutputSize,Âsafe,Âfull,Â0,ÂusingExtDict,
>Â-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(BYTEÂ*)dest,Â(constÂBYTEÂ*)dictStart,ÂdictSize);
>Â+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(BYTEÂ*)dest,Â(constÂBYTEÂ*)dictStart,ÂdictSize,ÂNoDynOffset);
>ÂÂ}
>
>ÂÂintÂLZ4_decompress_safe_usingDict(constÂcharÂ*source,ÂcharÂ*dest,
>ÂdiffÂ--gitÂa/lib/lz4/lz4defs.hÂb/lib/lz4/lz4defs.h
>ÂindexÂ00a0b58..9451a73Â100644
>Â---Âa/lib/lz4/lz4defs.h
>Â+++Âb/lib/lz4/lz4defs.h
>Â@@Â-75,6Â+75,7Â@@
>ÂÂ#defineÂWILDCOPYLENGTHÂ8
>ÂÂ#defineÂLASTLITERALSÂ5
>ÂÂ#defineÂMFLIMITÂ(WILDCOPYLENGTHÂ+ÂMINMATCH)
>Â+#defineÂDYN_BITÂ0x1
>
>ÂÂ/*ÂIncreaseÂthisÂvalueÂ==>ÂcompressionÂrunÂslowerÂonÂincompressibleÂdataÂ*/
>ÂÂ#defineÂLZ4_SKIPTRIGGERÂ6
>Â@@Â-87,6Â+88,7Â@@
>
>ÂÂ#defineÂMAXD_LOGÂ16
>ÂÂ#defineÂMAX_DISTANCEÂ((1Â<<ÂMAXD_LOG)Â-Â1)
>Â+#defineÂMAX_DISTANCE_DYNÂ((1Â<<Â(MAXD_LOGÂ-Â1))Â-Â1)
>ÂÂ#defineÂSTEPSIZEÂsizeof(size_t)
>
>ÂÂ#defineÂML_BITSÂÂÂÂÂÂÂÂ4
>Â@@Â-147,6Â+149,13Â@@ÂstaticÂFORCE_INLINEÂvoidÂLZ4_copy8(voidÂ*dst,ÂconstÂvoidÂ*src)
>ÂÂ#endif
>ÂÂ}
>
>Â+staticÂFORCE_INLINEÂvoidÂLZ4_copy4(voidÂ*dst,ÂconstÂvoidÂ*src)
>Â+{
>Â+ÂÂÂÂÂÂÂÂU32ÂaÂ=Âget_unaligned((constÂU32Â*)src);
>Â+
>Â+ÂÂÂÂÂÂÂÂput_unaligned(a,Â(U32Â*)dst);
>Â+}
>Â+
>ÂÂ/*
>ÂÂÂ*ÂcustomizedÂvariantÂofÂmemcpy,
>ÂÂÂ*ÂwhichÂcanÂoverwriteÂupÂtoÂ7ÂbytesÂbeyondÂdstEnd
>Â@@Â-224,4Â+233,6Â@@ÂstaticÂFORCE_INLINEÂunsignedÂintÂLZ4_count(
>ÂÂtypedefÂenumÂ{ÂendOnOutputSizeÂ=Â0,ÂendOnInputSizeÂ=Â1Â}ÂendCondition_directive;
>ÂÂtypedefÂenumÂ{ÂfullÂ=Â0,ÂpartialÂ=Â1Â}ÂearlyEnd_directive;
>
>Â+typedefÂenumÂ{ÂNoDynOffsetÂ=Â0,ÂDynOffsetÂ=Â1Â}ÂDynamic_Offset;
>Â+
>ÂÂ#endif
>Â--
>Â1.7.1
Â
Â