tar
In order to compress a nested directory with tar without having to first change into its parent directory, the -C flag can be used:
-C
$ tar -czvf compressed.tar.gz -C path/to/almost/ target_dir
source