# README
String vs Binary Data
- Save integer as string in file, steps involved -
- Save integer as binary encoded data in file, steps involved -
- Convert integer to binary encoded data - Using
binary.LittleEndian.PutUint64
function, which converts integer to bytes. - Write binary encoded data to file - Using
Write
function to write bytes to file.
- Convert integer to binary encoded data - Using
The string path has a extra step of converting integer to string first then to bytes, whereas the binary path makes that conversion to bytes in binary encoded form much quicker.