python-zstandard
python-zstandard copied to clipboard
Usage examples
Hello there! It was awesome to find your library and I'd like to test it. I appreciate all the time and effort you put into it and writing the documentation. One thing that is missing (which I think is very important) is some usage examples for each case (one shot vs streaming) for both compression and decompression. I imagine this is much easier to do than all the other docs you already wrote but it will help newcomers tremendously, as they will have a place to start. I would put that right after "Installing", before the "Concepts" section. This would give a feel for how one should use the library.
This should also help with issue #18 (if I would have such examples I might take a stab at implementing the cmd line interface).
Thanks again!
Are the docs at https://python-zstandard.readthedocs.io/en/latest/compressor.html and https://python-zstandard.readthedocs.io/en/latest/decompressor.html sufficient?
[EDIT] - I just found test_tarfile_compat
in the main/tests/test_compressor.py
suite, should I use that as an example? If that works what is the point of #23?
-- ORIGINAL COMMENT --
I've seen those, thank you. But I was looking for a more "streamlined" example. For example, the most useful example (for me at least) would be to show how to compress a folder into a .tar.zst
file (and how to decompress it).
@indygreg I still don't see an example for how to create .tar.zst
file or decompress it. Is that possible with the current version?
Thank you for maintaining this package!
I find the one-shot APIs (which are what I reach for most often) are slightly buried in the docs, on the second page of "Miscellaneous APIs": https://python-zstandard.readthedocs.io/en/latest/misc_apis.html
It's possible that was intentional on your part, but would you be interested in accepting a PR moving the docs for zstandard.open
, zstandard.compress
and zstandard.decompress
to a new section named "One-shot APIs" that can be linked to from the "Choosing an API" subsection?
I opened #213 in case so!
I have spent +2hrs trying to use this package and still can't figure out how to properly StreamCompress files into tar files. There documentation needs more examples.