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

Improve error handling in libribzip2 #12

Open
torfmaster opened this issue Jan 29, 2022 · 0 comments
Open

Improve error handling in libribzip2 #12

torfmaster opened this issue Jan 29, 2022 · 0 comments
Labels
difficulty medium help wanted Extra attention is needed
Milestone

Comments

@torfmaster
Copy link
Owner

Provide error types for compression and decompression. There should be

  • a type for compression basically wrapping IO errors
  • a type for decompression basically wrapping IO errors or a decompression domain specific error

As decompression errors are usually not recoverable the decompression domain specific error could be a flat enum containing the following cases (to be completed)

  • selected non-existing Huffman table
  • data exceeds block size of 900k (e.g. RLE or ZLE produces unexpectedly long blocks)
  • crc errors
  • orig_pointer out of bounds

and many more. The errors should come with speaking display implementations. Ideally the CLI should display them instead of just panicking.

@torfmaster torfmaster added help wanted Extra attention is needed difficulty medium labels Jan 29, 2022
@torfmaster torfmaster changed the title Improve error handling in the libribzip2 Improve error handling in libribzip2 Jan 31, 2022
@torfmaster torfmaster added this to the libribzip2 milestone Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty medium help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant