Material flux and porosity changes during sediment diagenesis