Description
The package defines a ReadError which "reports an error encountered while reading input" and a WriteError which "reports an error encountered while writing output". However, a quick peruse through the package code shows that WriteError is never used. Secondly, its use of ReadError is inconsistent.
There are 3 instances where the Reader is used in inflate.go: L635, L677, and L699. The call to ReadByte lacks a the wrapper for ReadError. Interestingly, the bulk of DEFLATE compression will be done through the ReadByte call, thus, usage of ReadError seems to only occur when decoding a raw block.
Should use of ReadError and WriteError be removed and marked as deprecated? Or should the library properly handle both error types? Other packages don't seem to wrap IO errors with package specific errors.