Expose ZSTD_reset_compressedBlockState() to shared API

This commit is contained in:
Sen Huang
2019-11-08 13:57:26 -05:00
parent 6ce335371b
commit b39149e156
3 changed files with 7 additions and 11 deletions
+2 -8
View File
@@ -112,14 +112,8 @@ size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictSize)
if (!bs || !wksp || !offcodeNCount) {
return ERROR(memory_allocation);
}
int i;
for (i = 0; i < ZSTD_REP_NUM; ++i)
bs->rep[i] = repStartValue[i];
bs->entropy.huf.repeatMode = HUF_repeat_none;
bs->entropy.fse.offcode_repeatMode = FSE_repeat_none;
bs->entropy.fse.matchlength_repeatMode = FSE_repeat_none;
bs->entropy.fse.litlength_repeatMode = FSE_repeat_none;
ZSTD_reset_compressedBlockState(bs);
headerSize = ZSTD_loadCEntropy(bs, wksp, offcodeNCount, &offcodeMaxValue, dictBuffer, dictSize);
free(bs);
free(wksp);