{ 0, 22, 20, 22, 4, 4, ZSTD_lazy2 }, /* level 11 + L=4 */ // 41902762 lazy1=42087013 norep1=42911693
{ 0, 23, 21, 22, 5, 4, ZSTD_btlazy2 }, /* level 16 + L=4 */ // 41233150 btlazy1=41560211 norep1=42322286
{ 0, 23, 21, 22, 5, 4, ZSTD_opt }, /* level 23 */
- { 0, 23, 21, 22, 5, 4, ZSTD_opt_bt }, /* level 23 */
+ { 0, 23, 21, 22, 5, 4, ZSTD_opt_bt }, /* level 24 */
},
{ /* for srcSize <= 256 KB */
/* W, C, H, S, L, strat */
return lit_cost + match_cost;
}
+MEM_STATIC size_t ZSTD_getPrice(seqStore_t* seqStorePtr, size_t litLength, const BYTE* literals, size_t offsetCode, size_t matchCode)
+{
+#if 0
+ static const BYTE* g_start = NULL;
+ if (g_start==NULL) g_start = literals;
+ //if (literals - g_start == 8695)
+ printf("pos %6u : %3u literals & match %3u bytes at distance %6u \n",
+ (U32)(literals - g_start), (U32)litLength, (U32)matchCode+4, (U32)offsetCode);
+#endif
+ size_t price = 0;
+
+ /* literals */
+ seqStorePtr->lit += litLength;
+
+ /* literal Length */
+ if (litLength >= MaxLL) {
+ *(seqStorePtr->litLength++) = MaxLL;
+ if (litLength<255 + MaxLL) price += 8; else price += 32;
+ }
+ else *(seqStorePtr->litLength++) = (BYTE)litLength;
+
+ /* match offset */
+ *(seqStorePtr->offset++) = (U32)offsetCode;
+
+ /* match Length */
+ if (matchCode >= MaxML) {
+ *(seqStorePtr->matchLength++) = MaxML;
+ if (matchCode < 255+MaxML) price += 8; else price += 32;
+ }
+ else *(seqStorePtr->matchLength++) = (BYTE)matchCode;
+
+ return price;
+}
+
+
#define SET_PRICE(pos, mlen, offset, litlen, price) \
{ \