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

export errors #24

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

export errors #24

wants to merge 1 commit into from

Conversation

tribes2
Copy link

@tribes2 tribes2 commented Dec 28, 2024

It would be nice to use errors.Is instead of strings.Contains(err.Error(), "bad data:").

My use case is decompressing potentially corrupt raw DEFLATE streams. The only error I care about exporting is ErrorBadData -it allows me to perform a binary search for uncorrupted bytes.

I figured other use cases might benefit from exposing all possible errors. Let me know if you'd prefer fewer errors exported, I'll update the PR.

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.

1 participant