]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Merge
authorDanielle Rozenblit <drozenblit@fb.com>
Mon, 17 Oct 2022 18:24:24 +0000 (11:24 -0700)
committerDanielle Rozenblit <drozenblit@fb.com>
Mon, 17 Oct 2022 18:24:24 +0000 (11:24 -0700)
1  2 
lib/common/huf.h
lib/compress/huf_compress.c

Simple merge
index d8bbaa6b4ae4639e96a0df1bebf47658e7db0049,e94b398da87d6e8d193c7172774eb91126aff973..b6905d3a6e69c8d1ce63973603a761cb4b0d8f99
@@@ -1258,8 -1255,8 +1255,9 @@@ unsigned HUF_minTableLog(unsigned symbo
  
  unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, void* workSpace, size_t wkspSize, HUF_CElt* table, const unsigned* count, HUF_depth_mode depthMode)
  {
 -    unsigned optLog = FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1);
 +    unsigned optLogGuess = FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1);
 +    unsigned optLog = optLogGuess;
+     assert(srcSize > 1); /* Not supported, RLE should be used instead */
  
      if (depthMode == HUF_depth_optimal) { /** Test valid depths and return optimal **/
          BYTE* dst = (BYTE*)workSpace + sizeof(HUF_WriteCTableWksp);