Member-only story

How to compress (bzip / gzip) a very large text quickly ?

Ganesh Chandrasekaran
1 min readMay 15, 2019

--

Compressing files is very important when you are using platforms like Hadoop or FTP. Here is how I do it easily and quickly.

Image Source : Pixabay

Step 1 : Install GNU Parallels in your machine. ?

Step 2 : csv to bz2

$ cat largefile.csv | /usr/local/bin/parallel -- pipe -k bzip2 — best > largefile.bz2

Step 2 : csv to gz

$ cat largefile.csv | /usr/local/bin/parallel --pipe -k gzip > largefile.gz

--

--

Written by Ganesh Chandrasekaran

Big Data Solution Architect | Adjunct Professor. Thoughts and opinions are my own and don’t represent the companies I work for.

No responses yet

Write a response