similar to perf record:
-z, --compression-level[=n]
Produce compressed trace using specified level n (default: 1
- fastest compression, 22 - smallest trace)
I think this would mean an (optional?) dependency on zlib and then "just" wrap the file output in a compression function using the level as specified / default and having the pgconvert tool using zlib to open the file.
The reason for this FR is that the CPU doing the profiling commonly has some spare cycles and reducing the data to write also leads to an io speedup (and long profiling always tends to fill the disk fast).