Postgres database with compressed option on windows

Here is a simple command to take Postgres Database backup with Compress option

pg_dump -Fc dbname > filename

Here is the official document from

Use pg_dump's custom dump format. If PostgreSQL was built on a system with the zlib compression library installed, the custom dump format will compress data as it writes it to the output file. This will produce dump file sizes similar to using gzip, but it has the added advantage that tables can be restored selectively. The following command dumps a database using the custom dump format: