iostruct provides a struct that can read/write itself from/to IO-like objects.