Compute Rental
Ctrl K

Guide

Compression / Decompression

GuideIntegrationsFAQSupport
PricingBlog
Quick StartTop-Up and BillingAccelerating Access to Academic ResourcesQuick StartIntroductionMaintenance and TroubleshootingNetwork
PlatformJetBrain ProjectorTmpWebCal Scholars Program @2026Introduction to the Public Beta/Suqian Zone AAbout UsCopying Data Between InstancesAnalysis of Server Performance MetricsTidal Computing PowerLoad Balancing
Domestic ChipsUsing Huawei MindIEHuawei Ascend NPUMooreThread GPU
Environment SetupCUDA/cuDNNMinicondaPython3.XInstalling DependenciesOverviewImages
Enterprise FeaturesFlexible DeploymentElastic Deployment Release NotesBest Practices for Elastic DeploymentPerformance Metrics Monitoring
Container InstancesJupyterLabRemote SSH ConnectionSave the imageScaling ConfigurationMulti-machine, multi-GPU parallel processingDaemonOverviewChange the billing methodMigration Example (Same Region)Migration ExamplesRemote DesktopReset the system
Choosing a GPUGPU SelectionPerformance Testing
DataUpload DataDownload DataPublic DataPublic Cloud Storage (Highly Recommended)Compression / DecompressionFile StorageLocal data diskOverview
Best PracticesFileZillaGitGromacsHuggingFaceKataGoLinux BasicsMPIOpenCLPyCharm Remote DevelopmentR (RStudio) InstallationSSH TunnelTensorBoardRemote Development with VSCodeVisdomVulkanXShellOpen PortsWeChat MessagesPerformanceExpose multiple servicesMoney-Saving TipsComputation Precision IssuesSoftware Sources

Data

Compression / Decompression

07/30/202635950 views

Unless otherwise specified, we recommend using the .tar format for packages, as this format only bundles files without compressing them. Since images, videos, and other media typically cannot be further compressed, bundling without compression is the fastest and least resource-intensive method for packaging and extracting files.

Since installed ZIP, RAR, and other archivers can only extract or compress a specific type of archive, here is a small utility that supports the following extraction formats: .tar, .zip, .rar, .7z, and the following compression/packaging formats: .zip,.tar

# 下载安装工具
curl -L -o /usr/bin/arc http://webcal-public.ks3-cn-beijing.ksyun.com/tool/arc && chmod +x /usr/bin/arc

# 压缩/打包
arc compress xxx.zip path/to/directory

# 解压
arc decompress xxx.zip
或者解压到指定目录
arc decompress xxx.zip path/to/directory

If you are unable to extract a specific ZIP archive using the commands above or the unzip command, first check the file size. If the file size matches that of the source file, try the following command to extract it:

apt-get update && apt-get install -y fastjar
jar xvf xxx.zip

If the above tools do not work properly, use a standard file compression and decompression program instead:

  1. Compress and decompress ZIP files
# 压缩。如果没有zip命令,安装命令:apt-get update && apt-get install -y zip
zip -r <自定义压缩包名称>.zip <待压缩目录的路径>

# 解压。如果没有zip命令,安装命令:apt-get update && apt-get install -y unzip
unzip  <待解压压缩包名称>.zip -d <解压到哪个路径>
  1. Compressing and decompressing tar files
# 压缩(具体是指打包,未压缩,非常推荐这种方式,因为压缩/解压都耗时,但是图片等都无法再压缩)
tar -cf <自定义压缩包名称>.tar <待压缩目录的路径>

# 解压
tar -xf <待解压压缩包名称>.tar -C <解压到哪个路径>
  1. Compress tar.gz and decompress tar.gz
# 压缩
tar -czf <自定义压缩包名称>.tar <待压缩目录的路径>

# 解压
tar -xzf <待解压压缩包名称>.tar -C <解压到哪个路径>
  1. Unzip the RAR file
# 不推荐使用rar的包,linux下非常不常用
# 解压。如果没有zip命令,安装命令:apt-get update && apt-get install -y unrar
unrar e <待解压压缩包名称>.rar
Next articleMulti-machine, multi-GPU parallel processing
Compute Rental DocsBack to Guide