src/Bunny/Protocol/ProtocolReader.php
public function consumeBits(Buffer $buffer, $n)
    {
        $bits = [];
        $value = $buffer->consumeUint8();
        for ($i = 0; $i < $n; ++$i) {
            $bits[] = ($value & (1 << $i)) > 0;
        }
        return $bits;
    }
public function consumeBits(Buffer $buffer, $n)
    {
        $bits = [];
        $value = $buffer->consumeUint8();
        for ($i = 0; $i < $n; ++$i) {
            $bits[] = ($value & (1 << $i)) > 0;
        }
        return $bits;
    }
public function consumeBits ( Buffer $ buffer , $ n ) { $ bits = [ ] ; $ value = $ buffer -> consumeUint8 ( ) ; for ( $ i = 0 ; $ i < $ n ; ++ $ i ) { $ bits [ ] = ( $ value & ( 1 << $ i ) ) > 0 ; } return $ bits ; }
Consumes packed bits from buffer.

@param Buffer $buffer
@param int $n
@return array
Consumes packed bits from buffer .