Skip to content

Instantly share code, notes, and snippets.

@DirkyJerky
Last active November 5, 2015 19:52
Show Gist options
  • Save DirkyJerky/c96f1fd48310e2112df8 to your computer and use it in GitHub Desktop.
Save DirkyJerky/c96f1fd48310e2112df8 to your computer and use it in GitHub Desktop.
void to_bin(unsigned char c, char *out) {
*(unsigned long long*)out = 3472328296227680304ULL +
(((c * 9241421688590303745ULL) / 128) & 72340172838076673ULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment