Binary packet writer/reader.