Why does LaTeX gzip the synctex file?

It's true that gzipping the .synctex file saves space on disk. For a 500 page book, the size is

-rw-r--r-- user group   3.9M May 29 01:16 foo.synctex.gz

while the unzipped file is

-rw-r--r-- user group    18M May 29 01:16 foo.synctex

The PDF file turns out to be only 2.2 MiB; the figures speak by themselves: the size grows very fast. Unzipping the file on the fly when requested by the software that does the synchronization between editor and PDF viewer is fast and doesn't create a noticeable overhead.

Modern computers don't have big space constraints on disk, but a 4.5 to 1 ratio should not be neglected, if it's reasonable to compress the file.

A similar thing happens with the .odt format used by word processors: it's just a compressed ZIP file under cover. The GNU program gzip may seem insignificant for smaller files, but has the advantage that decompression is fast.


Most probably the .synctex file is gzipped by default simply to save disk space.

Other auxiliary files are not gzipped as they are smaller in size and need to be read quickly during compilation (the .synctex file doesn't play a role during compilation, but is used by PDF readers to link back to your TeX code).