changed the way architecture-specific values (mostly size_t) are persisted, now always writing the non-truncated value and checking for data loss when reading (passing along original size in header to know what to read)