Skip to content

Instantly share code, notes, and snippets.

Created April 5, 2010 08:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/356162 to your computer and use it in GitHub Desktop.
(defn get-int-from-byte-quad [byte-quad]
(loop [shift-amount 24
quad byte-quad
result 0]
(if quad
result
(recur (- shift-amount 8)
(next quad)
(bit-or result (bit-shift-left (bit-and 0xff (first quad)) shift- amount))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment