I need to compress many input files into one output file.
But the “zstd” and “FIO_compressMultipleFilenames” in fileio.c support only compress 1 input file .
Is there any other example for me?
The easiest solution is to pack files into a TAR archive and use zstd to compress this TAR file.
As far as I can tell, the following command is supposed to work fine :
zstd file* -c > result.zst.
It gives the same result as :
zstd file*
cat *.zst > result.zst
Has this answer helped your use case @dracular1983 ?
Thank you Cyan4973,.
I want to integration the "zstd" with gzip program ,such as libzipachive and libtarzip. I will do my best to realize it .
I am also looking foward that the zstd to support gzip file access functions
It looks to me that your project would highly benefit from the zlibwrapper library developed by @inikep .
The latest version (in dev branch) supports gz* access functions, and is able to dynamically deal with a mixture of zlib and zstd streams.
For more information, look at the README.md.
Porting effort for an application which already uses zlib is expected to be minimal.
thank you Cyan4973.
I have completed to replace zlib with zstd in our project!
I will test the performace and using of memory later!
@Cyan4973
hi , in my project , zstd is faster than zlib. But it also uses much more memory. How can i adjust the using of memory ,except using lower compress level.
You can use the _*advanced() versions, which make it possible to directly control parameters.
That's fairly advanced stuff ...
@Cyan4973 @inikep thank you very much!
if i meet other problem with using zstd in out product, i will start a new question!