If you want to copy the SQL output to a compressed file, you can pipe the output through an external compression program, such as gzip.
In the following example, I am creating a temporary table, "xyz," and then copy the table into a tab-separated file.
CREATE temporary table xyz as (
SELECT *
FROM customers
);
\copy xyz to PROGRAM 'gzip > person_drug_data.tsv.gz' WITH DELIMITER E'\t' CSV HEADER QUOTE E'\b';