Use zlib to avoid having to implement checksumming.
As a bonus, compression! :p