Delete unused Huffman functions

Remove all Huffman functions that aren't used by zstd.
This commit is contained in:
Nick Terrell
2023-01-20 14:12:53 -08:00
committed by Nick Terrell
parent bb9b9bc7be
commit 0cc1b0cb22
15 changed files with 57 additions and 581 deletions
+5 -5
View File
@@ -460,7 +460,7 @@ static size_t writeHufHeader(U32* seed, HUF_CElt* hufTable, void* dst, size_t ds
}
/* Write table description header */
{ size_t const hSize = HUF_writeCTable (op, dstSize, hufTable, maxSymbolValue, huffLog);
{ size_t const hSize = HUF_writeCTable_wksp (op, dstSize, hufTable, maxSymbolValue, huffLog, WKSP, sizeof(WKSP));
if (hSize + 12 >= srcSize) return 0; /* not useful to try compression */
op += hSize;
}
@@ -562,12 +562,12 @@ static size_t writeLiteralsBlockCompressed(U32* seed, frame_t* frame, size_t con
do {
compressedSize =
sizeFormat == 0
? HUF_compress1X_usingCTable(
? HUF_compress1X_usingCTable_bmi2(
op, opend - op, LITERAL_BUFFER, litSize,
frame->stats.hufTable)
: HUF_compress4X_usingCTable(
frame->stats.hufTable, /* bmi2 */ 0)
: HUF_compress4X_usingCTable_bmi2(
op, opend - op, LITERAL_BUFFER, litSize,
frame->stats.hufTable);
frame->stats.hufTable, /* bmi2 */ 0);
CHECKERR(compressedSize);
/* this only occurs when it could not compress or similar */
} while (compressedSize <= 0);