Reversible and irreversible compaction of ultrafiltration membranes