While gzip itself works on single files, it is commonly used in conjunction with tar to handle multiple files and directories, providing a versatile solution.