tukaani-project / xz

XZ Utils
https://tukaani.org/xz/
Other
532 stars 95 forks source link

lzma_lzma_preset() return failure with unsupported Match Finder #39

Closed JiaT75 closed 1 year ago

JiaT75 commented 1 year ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces: - [X] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming, typo fix) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior?

lzma_lzma_preset() will return success, even if the preset is unusable with the liblzma build.

Related Issue URL: fixes https://github.com/tukaani-project/xz/issues/37

What is the new behavior?

Does this introduce a breaking change?

Other information

Alternatively, this could be solved with a documentation change if we want to explicitly say that lzma_lzma_preset() does not guarantee that the preset is usable. Based on the current documentation, it seems that lzma_lzma_preset() should only return success if the preset is usable.