文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

文件的压缩和解压缩 c++

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

Macs ship with a robust built-in compression tool that can help you zip and unzip files and folders. Plus, it’s very easy to use! For added functionality, you can always try a third-party app as well.

Mac随附了强大的内置压缩工具,可以帮助您压缩和解压缩文件和文件夹。 另外,它非常易于使用! 对于附加功能,您也可以随时尝试使用第三方应用程序。

First, let’s talk about the built-in Archive Utility tool. It’s not an app, but a feature deeply integrated into the Finder app.

首先,让我们谈谈内置的Archive Utility工具。 它不是应用程序,而是深度集成到Finder应用程序中的功能。

如何在Mac上压缩文件和文件夹 (How to Zip Files and Folders on Mac)

To get started, open the “Finder” app, and locate the files or folders that you want to compress. If you’re selecting multiple files, hold the Command key while selecting the files.

首先,打开“ Finder”应用程序,然后找到要压缩的文件或文件夹。 如果要选择多个文件,请在选择文件时按住Command键。

Once you’ve made the selection, right-click on it to view the context menu. Here, click the “Compress” option.

做出选择后,右键单击它以查看上下文菜单。 在这里,单击“压缩”选项。

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

If you’re using multiple files, the Compress option will also show you how many files you’ve selected.

如果您正在使用多个文件,则“压缩”选项还将显示所选的文件数量。

Once the compression process is finished, you’ll see a new compressed file in the same folder. If you compressed a single file or folder, the archive will carry the same name, with a “.zip” extension.

压缩过程完成后,您将在同一文件夹中看到一个新的压缩文件。 如果压缩单个文件或文件夹,则存档将使用相同的名称,并带有“ .zip”扩展名。

If you compressed multiple files, you’ll see a new file with the name “Archive.zip.” You should rename the file to make it easier to find.

如果压缩了多个文件,则会看到一个名为“ Archive.zip”的新文件。 您应该重命名该文件以使其更易于查找。

You can now move the compressed Zip file to another folder or send it along as an email attachment.

现在,您可以将压缩的Zip文件移动到另一个文件夹,或将其作为电子邮件附件发送。

如何在Mac上解压缩文件和文件夹 (How to Unzip Files and Folders on Mac)

Unzipping an archive is even easier. It doesn’t matter if it’s a Zip file that you downloaded on the internet or something that you compressed yourself.

解压缩档案更加容易。 不管是您在Internet上下载的Zip文件还是您自己压缩的文件。

Navigate to the archive in the Finder app and double-click the Zip file. After several seconds, the file or the folder will decompress in the same folder.

导航到Finder应用程序中的存档,然后双击Zip文件。 几秒钟后,文件或文件夹将在同一文件夹中解压缩。

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

If it was a single file, you’ll see that the file will return to its original state, with the name intact. If you are decompressing a folder or a Zip file that contained multiple files, it will show up as a folder with the same name as the archive.

如果是单个文件,您会看到文件将恢复为原始状态,名称不变。 如果要解压缩包含多个文件的文件夹或Zip文件,它将显示为与存档名称相同的文件夹。

如何更改存档实用程序设置 (How to Change Archive Utility Settings)

Even though Archive Utility has no visible UI, you can change some of its settings. To do this, open Spotlight on your Mac (Command+Space), and search for “Archive Utility.”

即使Archive Utility没有可见的UI,您也可以更改其某些设置。 为此,请在Mac上打开Spotlight (Command + Space),然后搜索“ Archive Utility”。

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

Once it opens, click the “Archive Utility” item from the menu bar, and click the “Preferences” option.

打开后,单击菜单栏中的“归档实用程序”项,然后单击“首选项”选项。

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

Here, you’ll be able to change the behavior of the Archive Utility in the Finder app. You can create a new default destination for all compressed and uncompress files as well as choose to move archived files to the Trash.

在这里,您将能够在Finder应用程序中更改存档实用程序的行为。 您可以为所有压缩和解压缩文件创建一个新的默认目标,也可以选择将存档文件移动到垃圾箱。

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

第三方替代方案:取消存档 (Third-Party Alternative: The Unarchiver)

If you’re looking for more features, or if you want to uncompress different formats like RAR, 7z, Tar, and so on, try The Unarchiver. It’s a completely free utility that supports more than a dozen popular and obscure archive formats.

如果您正在寻找更多功能,或者想要解压缩 RAR,7z,Tar等不同格式 ,请尝试The Unarchiver 。 这是一个完全免费的实用程序,支持十多种流行且晦涩的存档格式。

文件的压缩和解压缩 c++_如何在Mac上压缩和解压缩文件和文件夹

The app lets you change the default extraction destination. Additionally, it lets you choose to create a new folder for extract files, automatically open the folders once the extraction is completed, and enable an option to move the archive to the Trash once the extraction is done.

该应用程序可让您更改默认提取目标。 此外,它还允许您选择创建用于提取文件的新文件夹,提取完成后自动打开文件夹,并启用一个选项以在提取完成后将存档移至“废纸rash”。

翻译自: https://www.howtogeek.com/672240/how-to-zip-and-unzip-files-and-folders-on-mac/

文件的压缩和解压缩 c++