With libxml2 this is a simple flag on opening the file for write. IIRC libxml2 recognizes compressed files automatically on read.
With compression we get the added benefit of faster access time from our NAS, since there is much less to move around.
With a little more work we've also split our largest XML stream into multiple files which we read in sequence.
YMMV,
Peter