XzDec status is strange?
A free file archiver for extremely high compression
Brought to you by:
ipavlov
(In this ticket, patch is optional; need discussion first)
In decompression loop, I see the situation that "no decompression buffer nor compression buffer is consumed, but CODER_STATUS_NOT_FINISHED is set to status (by XzDec.c)".
I suppose in this case CODER_STATUS_NEEDS_MORE_INPUT should be set instead.
I'd like your opinion.
I don't think that I need to fix it.
It returns CODER_STATUS_NEEDS_MORE_INPUT in another cases.
Then could you tell me what's wrong with this code?
In this code, shared buffer is 4MB and first 2MB is used for storing xz stream.
When I test, xz files larger than 2MB cannot be decompressed (without the "awful" line).
Probably there were some reasons why I used such codes.
You can look XzHandler.cpp as example client code.
It reads input stream when it's possible.
And it uses CODER_STATUS_NEEDS_MORE_INPUT only to detect some error cases.
Thank you. I checked XzHandler and LzmaDecoder, and I now know the correct handling.
Hopefully these two are bundled in LZMA SDK, which means public domain (or "permissive")...