Skip to content

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