Skip to content

Instantly share code, notes, and snippets.

@Ch00by
Created August 16, 2011 01:42
Show Gist options
  • Save Ch00by/1148277 to your computer and use it in GitHub Desktop.
Save Ch00by/1148277 to your computer and use it in GitHub Desktop.
alternative code
calc = (buf,idx,i) ->
if i != 2 then buf[idx++] * Number("0x1" + [1..i].map(j) -> "0") + calc(buf,idx, i - 2) else buf[idx++]
return num * 0x100000000000000 + calc(buf,idx,i)
## Original, lines 343 - 350 ##
return num * 0x100000000000000 +
buf[idx++] * 0x1000000000000 +
buf[idx++] * 0x10000000000 +
buf[idx++] * 0x100000000 +
buf[idx++] * 0x1000000 +
buf[idx++] * 0x10000 +
buf[idx++] * 0x100 +
buf[idx++]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment