# Compressing read data (converting fastq to fastq.gz) on Windows

I downloaded some of my data in fastq format instead of fastq.gz. I want to upload my data on a server now.

I was wondering if there is a way to convert my fastq files to fastq.gz on windows (I read some stuff about python, but I'm not quite sure) before uploading them on the server, since it takes a lot of time uploading the fastq files.

• How about downloading onto the server directly? How did you download, as when it is from NCBI it will be faster to just redownload and gzip-compress on the fly.
– user3051
Jul 3, 2021 at 13:26

## 3 Answers

7zip is file archiver capable of running gzip-style compression, and runs on Windows: https://www.7-zip.org/

If your Windows 10 build number is 17063 or later, you can use tar command to compress file in Windows PowerShell:

tar -vczf output.fq.gz input.fastq


The -z flag means to compress archive with gzip.

Do yourself a favor. Bioinformatics is 99% done in Unix environments, and trying to come up with Windows solutions is unnecessary effort. The Windows Subsystem Linux (WSL2) provides you with a native Linux distribution within Windows that easily allow you to do any Unix-ish thing such as running gzip. It is straight-forward to install, see its online documentation.

• Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
– Community Bot
Jun 28 at 20:37
• You could be a little less condescending especially given how late your answer is. Jun 28 at 21:36