Closed darrenrhea closed 6 years ago
As described in fse.h
:
@return : size of compressed data (<= dstCapacity). Special values : if return == 0, srcData is not compressible => Nothing is stored within dst !!! if return == 1, srcData is a single byte symbol * srcSize times. Use RLE compression instead.
Special values are not considered as "errors".
As a consequence, using FSE_isError()
on a special value will return 0
(false).
Another potential outcome is to get error code FSE_error_dstSize_tooSmall
, when, as the name implies, dstSize
is too small to contain the compressed input. This may happen whenever provided dstSize < FSE_compressBound(srcSize)
, and input is not compressible enough to fit into intended size.
I feel like I might be running into an issue with the error codes.
When FiniteStateEntropy finds that it is simply one symbol is repeated many times, it should send back a code suggesting Run Length Encoding.
Also when it does not manage to make it smaller, it should send back another code.
But
FSE_isError
andFSE_getErrorName
don't do what I would expect here:What is intended?