Closed remicollet closed 4 years ago
With current version
$ php -r 'var_dump(zstd_uncompress(zstd_compress("")));' bool(false)
With this fix
$ php -n -d extension=modules/zstd.so -r 'var_dump(zstd_uncompress(zstd_compress("")));' string(0) ""
From ZSTD_compress doc: * note 1 : a 0 return value means the frame is valid but "empty".
* note 1 : a 0 return value means the frame is valid but "empty".
Notice, we may also want to use RETVAL_EMPTY_STRING is such case.... (less allocation, returns an interned string)
RETVAL_EMPTY_STRING
Thanks.
With current version
With this fix
From ZSTD_compress doc:
* note 1 : a 0 return value means the frame is valid but "empty".