Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow user to ignore trailing bytes #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Niedzwiedzw
Copy link

Pull Request Overview

it allows for user to ignore trailing bytes, which made the crate unusable for me personally

Testing Strategy

This pull request was tested by...

  • Added relevant unit tests.
  • Added relevant end-to-end tests (such as .lzma, .lzma2, .xz files).

@Niedzwiedzw
Copy link
Author

I have also considered feature flag given that this changes the API a bit, I'll leave it up to your judgement

@7ERr0r
Copy link

7ERr0r commented Jan 15, 2023

That's a breaking change. Your API functions have different params.
I would suggest:

  • renaming your LzmaDecoder::new to maybe LzmaDecoder::new_with_options
  • renaming allow_trailing_bytes to allow_trailing_bytes_lzma since it's not effective for LZMA2 and XZ
  • maybe separating Options into LzmaOptions from StreamOptions

@gendx
Copy link
Owner

gendx commented Nov 5, 2023

  • Breaking API changes are not a problem per se, as they can be guarded by features and a SemVer bump at the next release.
  • As far as I understand it, this new option only applies to the raw stream, and therefore doesn't need to be part of the LZMA2 and xz APIs (which can simply invoke the LZMA layer with the default option).
  • In any case, unit tests are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants