Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to compress many input files into one output file #463

Closed
dracular1983 opened this issue Nov 29, 2016 · 9 comments
Closed

Support to compress many input files into one output file #463

dracular1983 opened this issue Nov 29, 2016 · 9 comments
Labels

Comments

@dracular1983
Copy link

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?

@inikep
Copy link
Contributor

inikep commented Nov 29, 2016

The easiest solution is to pack files into a TAR archive and use zstd to compress this TAR file.

@Cyan4973
Copy link
Contributor

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

@Cyan4973
Copy link
Contributor

Cyan4973 commented Dec 2, 2016

Has this answer helped your use case @dracular1983 ?

@dracular1983
Copy link
Author

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

@Cyan4973
Copy link
Contributor

Cyan4973 commented Dec 5, 2016

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.

@dracular1983
Copy link
Author

thank you Cyan4973.
I have completed to replace zlib with zstd in our project!
I will test the performace and using of memory later!

@dracular1983
Copy link
Author

@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.

@Cyan4973
Copy link
Contributor

Cyan4973 commented Dec 8, 2016

You can use the _*advanced() versions, which make it possible to directly control parameters.
That's fairly advanced stuff ...

@dracular1983
Copy link
Author

@Cyan4973 @inikep thank you very much!
if i meet other problem with using zstd in out product, i will start a new question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants