I do have a zlib compatible huffman encoder which is considerably faster at encoding,
You're welcomed to propose a faster huffman codec alternative.
The intention of the benchmark program is to compare all these alternatives.
Note that the version proposed by caveman is quite fast already, at around 250 MB/s (buffer to buffer, no disk/io involved).
It should complete enwik9 in 5 seconds, not in 20 seconds.
Maybe the I/O part plays a significant impact on the metric.
Also, as an unrelated note :
I'm curious to know what could be the result of an o1 coder using FSE bitStream.
It seems to me that it's now possible, using bitStream methods :
Code:
void* FSE_initCompressionStream(void** op, ptrdiff_t* state, const void** symbolTT, const void** stateTable, const void* CTable);
void FSE_encodeByte(ptrdiff_t* state, bitContainer_forward_t* bitC, unsigned char symbol, const void* CTable1, const void* CTable2);
static void FSE_addBits(bitContainer_forward_t* bitC, size_t value, int nbBits);
static void FSE_flushBits(void** outPtr, bitContainer_forward_t* bitC);
int FSE_closeCompressionStream(void* outPtr, bitContainer_forward_t* bitC, int nbStates, ptrdiff_t state1, ptrdiff_t state2, ptrdiff_t state3, ptrdiff_t state4, void* compressionStreamDescriptor, const void* CTable);