Skip to content

Instantly share code, notes, and snippets.

@Cergoo
Created December 20, 2013 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cergoo/8050580 to your computer and use it in GitHub Desktop.
Save Cergoo/8050580 to your computer and use it in GitHub Desktop.
[]byte to int
func read_int32(data []byte) int32 {
return int32(uint32(data[0]) + uint32(data[1])<<8 + uint32(data[2])<<16 + uint32(data[3])<<24)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment