Although XZ is perfect for preserving files during compression, it is much slower. The choice of format depends on the files to be shared. GZ is faster but larger. GZ is compressed using gzip algorithm, while XZ uses the recent LZMA algorithm.