facebook / zstd

Zstandard - Fast real-time compression algorithm

Home Page:http://www.zstd.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve misleading wording in the streaming decompression howto

dbuenzli opened this issue · comments

Describe the bug

The wording here is slightly misleading. You should not call again ZSTD_decompressStream() if output.pos == output.size and the function returned 0.

Expected behavior

Perhaps this could be changed to:

*  But if `output.pos == output.size` and the function returns greater than 0 there might be some data left within internal buffers.,

(I would have gladly PR'd but on a matter of principle I don't sign CLAs).

Thank you!

I think the wording could be stronger, and explicitly say that it is an error to call the function in that condition if that's the case.