To compress a directory in Linux you can use the zip command:
zip -r output_file.zip folder
You can compress multiple directories too by adding the folders' names :
zip -r output_file.zip folder1 folder2 folder3
To decompress the zipped file, use the command unzip: