kjdev/php-ext-zstd

zstd_uncompress error!

Opened this issue · 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.

test this file with zstd binary command, also work.

kjdev commented

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 commented

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