### Re^2: Bits & pieces

by bobf (Monsignor)
 on Jul 18, 2005 at 07:58 UTC ( #475665=note: print w/replies, xml ) Need Help??

\$s = eval
{
...
vec( \$textstr, \$index-1, 8 );
};
};

1: pack( 'b*', vec( '&|^', \$index-1, 1 ) ? '~' : '' )
2: \$commabyte
3: pack( 'c', vec( '&|^', (\$index-1)%3, 8 ) )
4: pack( 'b*', vec( '&|^', \$index-1, 1 ) ? '' : '~' )
5: vec( \$textstr, \$index-1, 8 ) )

[~](char) (operator) [~](char)

bit: 01234567  low nybbles
j =  01010110   0101
u =  10101110      1010
s =  11001110         1100
t =  00101110            0010

\$c = \$offset - ( (\$offset - (\$offset % 4))/4 + (\$offset % 4 ? 1 : 0) )
+; # first frame

...
(vec( \$bitstr, \$c + 1, 4 )<<4)) # high nybble
>> 4 - (\$offset % 4) - 4 * ( (\$offset % 4) ? 0 : 1 ) # shift o
+ff extra bits
);

\$i += \$i%2 ? -1 : 1
if(
...
!((\$offset + 1) % 3)     ) ||
\$offset + 1 == 22
);

\$T = vec( pack( 'C', \$i ), 0, 4 ) +
vec( pack( 'b*', \$_{65} ), \$offset, 1 ) * (1<<4) +
(1<<5);

print pack( 'c',
(\$T += \$T == (1<<5) ? 0 : (1<<6))
-= \$offset % 13 == 0 ? (1<<5) : 0 );

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://475665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2023-02-07 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?