ms_deflate will return MSCOMP_ARG_ERROR when the in field is NULL, even when in_avail == 0.
I do this in Squash a lot when calling it with MSCOMP_FINISH or MSCOMP_FLUSH and I don't have any more data. Getting around it now by passing a pointer to a uint8_t on the stack (still with 0 for in_avail) and ms-compress is fine with it.
ms_deflate
will returnMSCOMP_ARG_ERROR
when thein
field isNULL
, even whenin_avail == 0
.I do this in Squash a lot when calling it with
MSCOMP_FINISH
orMSCOMP_FLUSH
and I don't have any more data. Getting around it now by passing a pointer to auint8_t
on the stack (still with 0 forin_avail
) and ms-compress is fine with it.