Use size_t for datasize