Example #1
0
function freadbits($f, $count)
{
    global $CurrentBit, $SMode;
    $Byte = freadbyte($f);
    $LastCBit = $CurrentBit;
    $CurrentBit += $count;
    if ($CurrentBit == 8) {
        $CurrentBit = 0;
    } else {
        fseek($f, ftell($f) - 1);
    }
    return RetBits($Byte, $LastCBit, $count);
}
Example #2
0
function freadword($f)
{
    $b1 = freadbyte($f);
    $b2 = freadbyte($f);
    return $b2 * 256 + $b1;
}