Skip to content

Improve error handling in libribzip2 #12

@torfmaster

Description

@torfmaster

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions