public static function rawToBin($raw, $length = 0)
    {
        $gmp = gmp_import($raw);
        $bin = gmp_strval($gmp, 2);

        return self::pad($bin, $length);
    }
public static function rawToBin($raw, $length = 0)
    {
        $gmp = gmp_import($raw);
        $bin = gmp_strval($gmp, 2);

        return self::pad($bin, $length);
    }
public static function rawToBin ( $ raw , $ length = 0 ) { $ gmp = gmp_import ( $ raw ) ; $ bin = gmp_strval ( $ gmp , 2 ) ; return self :: pad ( $ bin , $ length ) ; }
Converts stream of bytes into binary string.

@param mixed $raw    Stream of bytes.
@param int   $length Minimum output length.

@return string Binary string.
Converts stream of bytes into binary string .