Thread Hex String umkehren
(3 answers)
Opened by Markus at 2015-08-20 14:13
Wie wär's mit diesem Code:
Code (perl): (dl
)
1 2 3 4 sub reverseBitsIn8BitChar { my $c = shift; return 0xFF & ((($c * 0x0802 & 0x22110) | ($c * 0x8020 & 0x88440)) * 0x10101 >> 16); } (frei nach http://graphics.stanford.edu/~seander/bithacks.htm...) |