How to make squashfs
You can use mksquashfs
sudo mksquashfs ./rootfs $OUTPUT_FILE_NAME -root-owned -e .svn
http://manpages.ubuntu.com/manpages/precise/man1/mksquashfs.1.html
How to extract squashfs
You can use unsquashfs
sudo unsquashfs -d /media/location1 /media/location2/file.squashfs
http://manpages.ubuntu.com/manpages/zesty/man1/unsquashfs.1.html