Skip to content

Instantly share code, notes, and snippets.

@ProTip
Created January 24, 2014 10:11
Show Gist options
  • Save ProTip/8594896 to your computer and use it in GitHub Desktop.
Save ProTip/8594896 to your computer and use it in GitHub Desktop.
lookup_bytes, err := ioutil.ReadFile("lookup")
if err != nil {
panic(err.Error())
}
lookup_bytes_buf := bytes.NewReader(lookup_bytes)
var dic_lookup []uint32
dic_lookup = make([]uint32, 0, 50000000)
err = binary.Read(lookup_bytes_buf, binary.LittleEndian, dic_lookup)
if err != nil {
panic(err.Error())
}
fmt.Println(len(dic_lookup))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment