codec/h264/h264dec/bits: removed ReadBitsInt and ReadBool as not required anymore

This commit is contained in:
Saxon 2019-07-29 13:43:03 +09:30
parent 6c69174303
commit 8e1e84d311
1 changed files with 0 additions and 18 deletions

View File

@ -128,24 +128,6 @@ func (br *BitReader) ReadBits(n int) (uint64, error) {
return r, nil
}
// ReadBitsInt reads n bits from the source, and returns as an int.
func (br *BitReader) ReadBitsInt(n int) (int, error) {
b, err := br.ReadBits(n)
if err != nil {
return 0, err
}
return int(b), nil
}
// ReadBool reads a single bit from the source, converts to a bool and returns.
func (br *BitReader) ReadBool() (bool, error) {
b, err := br.ReadBits(1)
if err != nil {
return false, err
}
return b == 1, nil
}
// PeekBits provides the next n bits returning them in the least-significant
// part of a uint64, without advancing through the source.
// For example, with a source as []byte{0x8f,0xe3} (1000 1111, 1110 0011), we