// ReadExt implements the codec.Ext interface for ext.
773202
func (e ext) ReadExt(v interface{}, buf []byte) {
	err := e.codec.Decode(buf, v)
	if err != nil {
		panic(fmt.Sprintf("Couldn't decode data into %v", v))
	}
}
1342751
func (f *MockFile) ReadAt(b []byte, off int64) (n int, err error) {
	return f.Read(b)
}
666900
func Ext(in string) string {
	_, ext := fileAndExt(in, fpb)
	return ext
}
1191210
func (cr *iso88591CharsetReader) ReadByte() (b byte, err error) {
	if cr.buffer.Len() <= 0 {
		r, err := cr.reader.ReadByte()
		if err != nil {
			return 0, err
		}
		if r < utf8.RuneSelf {
			return r, nil
		}
		cr.buffer.WriteRune(rune(r))
	}
	return cr.buffer.ReadByte()
}
857525
func ReadLines(fileName string) ([]string, error) {
	file, err := os.Open(fileName)
	if err != nil {
		return nil, err
	}
	defer file.Close()

	scanner := bufio.NewScanner(file)
	var lines []string
	for scanner.Scan() {
		lines = append(lines, scanner.Text())
	}
	return lines, scanner.Err()
}
865703
func (bz *Bz2) CheckExt(filename string) error {
	if filepath.Ext(filename) != ".bz2" {
		return fmt.Errorf("filename must have a .bz2 extension")
	}
	return nil
}
972827
func (br *bufReader) ReadText(encoding Encoding) []byte {
	if br.err != nil {
		return nil
	}

	var text []byte
	delims := encoding.TerminationBytes
	text, br.err = br.readTillDelims(delims)
	br.Discard(len(delims))

	return text
}
1167449
func (buf *Buffer) ReadByte() (byte, error) {
	if len(buf.buf) == 0 {
		return 0, io.EOF
	}

	c := buf.buf[0]
	buf.buf[0] = 0
	buf.buf = buf.buf[1:]
	return c, nil
}
393501
func convertExt(path string, ext string) string {
	return strings.TrimSuffix(path, filepath.Ext(path)) + ext
}
1182279
func (r *countReader) ReadByte() (byte, error) {
	b, err := r.fr.ReadByte()
	if err == nil {
		r.off++
	}
	return b, err
}
273538
func (f DumFile) ReadAt(p []byte, off int64) (n int, err error) {
	return 0, f.err
}
292872
func FromStringAndExt(t, ext string) (Type, error) {
	tp, err := fromString(t)
	if err != nil {
		return tp, err
	}
	tp.Suffixes = []string{strings.TrimPrefix(ext, ".")}
	return tp, nil
}
655385
func (f genHelperDecoder) DecExt(v interface{}) (r bool) {
	if xfFn := f.d.h.getExt(i2rtid(v)); xfFn != nil {
		f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext)
		return true
	}
	return false
}
700728
func (e ext) WriteExt(v interface{}) (buf []byte) {
	buf, err := e.codec.Encode(v)
	if err != nil {
		panic(fmt.Sprintf("Couldn't encode data in %v", v))
	}
	return buf
}
858024
func (rd *bitReader) readByte() (int, error) {
	if rd.head == rd.limit {
		if err := rd.refill(); err != nil {
			return 0, err
		}
	}

	rd.bits = 0
	rd.current = rd.buffer[rd.head]
	rd.head++
	return int(rd.current), nil
}
56876
func (d *Decoder) rawExt(f *codecFnInfo, rv reflect.Value) {
	d.d.DecodeExt(rv2i(rv), 0, nil)
}
1164968
func (f FakeFile) ReadAt(p []byte, off int64) (n int, err error) {
	return f.Buffer.ReadAt(p, off)
}