]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
adding bit container size 1802/head
authorBimba Shrestha <bimbashrestha@fb.com>
Wed, 18 Sep 2019 20:49:45 +0000 (13:49 -0700)
committerBimba Shrestha <bimbashrestha@fb.com>
Wed, 18 Sep 2019 20:49:45 +0000 (13:49 -0700)
lib/common/fse.h

index deac3f9918ae2e078d5f130f1308a0613f9fb7a6..a7553e3721c4ccc286aaf6699d0abd8272c031f0 100644 (file)
@@ -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 */