php-ext-zstd icon indicating copy to clipboard operation
php-ext-zstd copied to clipboard

zstd_uncompress error!

Open patrickkh7788 opened this issue 7 years ago • 3 comments

try use zstd_uncompress with binary file, return false without error message.

the 1.zstd binary is generate from nodejs with https://github.com/Stieneee/node-zstd.git. can be decode with nodejs.

node-zstd encode data can be decode by php-ext-zstd.

patrickkh7788 avatar Sep 26 '18 14:09 patrickkh7788

test this file with zstd binary command, also work.

patrickkh7788 avatar Sep 26 '18 15:09 patrickkh7788

php-ext-zstd does not suport streaming. Those compressed with Streaming need to decompress with Streaming.

node-zstd is compressed with Streaming.

if (dict != NULL && dictSize > 0) {
  ZSTD_initCStream_usingDict(zcs, dict, dictSize, level);
} else {
  ZSTD_initCStream(zcs, level);
}

TODO: Streaming support of php-ext-zstd

kjdev avatar Sep 28 '18 04:09 kjdev

6231a4756ae09116c331271948416f5c0cd3f495 Updated so that things compressed by streaming can be decompressed.

kjdev avatar Jan 06 '19 23:01 kjdev