Reply to post:

'I bet Russian hackers weren't expecting their target to suck so epically hard as this'

Androgynous Cupboard Silver badge

To encode these bits, the engineer decided to bitwise OR the destination byte with 2 raised to a particular power representing the bit position. "Bad approach, I know"

It's only a bad approach because there is no "to the power of" operator in C. Otherwise it's fine I think - I would expect a decent compiler in any language would treat "2**3" and "1<<3" as identical (when 2 was a numerical constant)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon