added some comments
fixed bug with infinite loop

4 bytes left unprocessed and I don't know why
more safe #defines
C89
added returning status check
preliminary bug fix for #11774
conflicts resolved before merge
name adjustment
comments
fix for #11774

after applying BCJ on buffer, less then 4 bytes may be left at the end of bufefer (depending on how close to the end jmp is met)
not sure about this condition