If a rock is compressed and its volume decreases, how will the rock's density and porosity be affected?