aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/compress/bzip2/bit_reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/compress/bzip2/bit_reader.go')
-rw-r--r--libgo/go/compress/bzip2/bit_reader.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/libgo/go/compress/bzip2/bit_reader.go b/libgo/go/compress/bzip2/bit_reader.go
index 50f0ec8..d058c14 100644
--- a/libgo/go/compress/bzip2/bit_reader.go
+++ b/libgo/go/compress/bzip2/bit_reader.go
@@ -7,25 +7,24 @@ package bzip2
import (
"bufio"
"io"
- "os"
)
// bitReader wraps an io.Reader and provides the ability to read values,
-// bit-by-bit, from it. Its Read* methods don't return the usual os.Error
+// bit-by-bit, from it. Its Read* methods don't return the usual error
// because the error handling was verbose. Instead, any error is kept and can
// be checked afterwards.
type bitReader struct {
r byteReader
n uint64
bits uint
- err os.Error
+ err error
}
// bitReader needs to read bytes from an io.Reader. We attempt to cast the
// given io.Reader to this interface and, if it doesn't already fit, we wrap in
// a bufio.Reader.
type byteReader interface {
- ReadByte() (byte, os.Error)
+ ReadByte() (byte, error)
}
func newBitReader(r io.Reader) bitReader {
@@ -42,7 +41,7 @@ func newBitReader(r io.Reader) bitReader {
func (br *bitReader) ReadBits64(bits uint) (n uint64) {
for bits > br.bits {
b, err := br.r.ReadByte()
- if err == os.EOF {
+ if err == io.EOF {
err = io.ErrUnexpectedEOF
}
if err != nil {
@@ -83,6 +82,6 @@ func (br *bitReader) ReadBit() bool {
return n != 0
}
-func (br *bitReader) Error() os.Error {
+func (br *bitReader) Error() error {
return br.err
}