From: Bimba Shrestha Date: Wed, 18 Sep 2019 20:49:45 +0000 (-0700) Subject: adding bit container size X-Git-Tag: v1.4.4~1^2~45^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1802%2Fhead;p=thirdparty%2Fzstd.git adding bit container size --- diff --git a/lib/common/fse.h b/lib/common/fse.h index deac3f991..a7553e372 100644 --- a/lib/common/fse.h +++ b/lib/common/fse.h @@ -308,7 +308,7 @@ If there is an error, the function will return an error code, which can be teste *******************************************/ /* FSE buffer bounds */ #define FSE_NCOUNTBOUND 512 -#define FSE_BLOCKBOUND(size) (size + (size>>7) + 4 /* constant for initial fse states */) +#define FSE_BLOCKBOUND(size) (size + (size>>7) + 4 /* fse states */ + sizeof(size_t) /* bitContainer */) #define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size)) /* Macro version, useful for static allocation */ /* It is possible to statically allocate FSE CTable/DTable as a table of FSE_CTable/FSE_DTable using below macros */