Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compress/flate: deprecate ReadError and WriteError
A vast majority of the time, ReadError isn't even returned during IO operations. Instead, an unwrapped error will be returned because of the ReadByte call on L705. Because DEFLATE streams are primarily compressed and require byte for byte Huffman decoding, most of the data read from a data stream will go through ReadByte. Although this is technically an API change, any user reliant on this error would not have worked properly anyways due to the fact that most IO error are not wrapped. We might as well deprecate ReadError. It is useless and actually makes clients that do depend on catching IO errors more difficult. Fixes golang#11856 Fixes golang#12724 Change-Id: Ib5fec5ae215e977c4e85de5701ce6a473d400af8 Reviewed-on: https://go-review.googlesource.com/14834 Reviewed-by: Nigel Tao <[email protected]>
- Loading branch information