contrib/python-zstandard/zstd/common/fse.h
changeset 43994 de7838053207
parent 42937 69de49c4e39c
equal deleted inserted replaced
43993:873d0fecb9a3 43994:de7838053207
   306 /* *****************************************
   306 /* *****************************************
   307 *  Static allocation
   307 *  Static allocation
   308 *******************************************/
   308 *******************************************/
   309 /* FSE buffer bounds */
   309 /* FSE buffer bounds */
   310 #define FSE_NCOUNTBOUND 512
   310 #define FSE_NCOUNTBOUND 512
   311 #define FSE_BLOCKBOUND(size) (size + (size>>7))
   311 #define FSE_BLOCKBOUND(size) (size + (size>>7) + 4 /* fse states */ + sizeof(size_t) /* bitContainer */)
   312 #define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size))   /* Macro version, useful for static allocation */
   312 #define FSE_COMPRESSBOUND(size) (FSE_NCOUNTBOUND + FSE_BLOCKBOUND(size))   /* Macro version, useful for static allocation */
   313 
   313 
   314 /* It is possible to statically allocate FSE CTable/DTable as a table of FSE_CTable/FSE_DTable using below macros */
   314 /* It is possible to statically allocate FSE CTable/DTable as a table of FSE_CTable/FSE_DTable using below macros */
   315 #define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue)   (1 + (1<<(maxTableLog-1)) + ((maxSymbolValue+1)*2))
   315 #define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue)   (1 + (1<<(maxTableLog-1)) + ((maxSymbolValue+1)*2))
   316 #define FSE_DTABLE_SIZE_U32(maxTableLog)                   (1 + (1<<maxTableLog))
   316 #define FSE_DTABLE_SIZE_U32(maxTableLog)                   (1 + (1<<maxTableLog))