멀티코어압축

spring·2024년 7월 25일
0

zip, 7z

# Ubuntu
sudo apt install p7zip-full -y
# CentOS
sudo yum install p7zip p7zip-plugins -y
# MacOS
brew install p7zip

멀티코어 zip 압축

7z a -mmt=<코어수> <이름>.zip <이름>/*

멀티코어 7z 압축

7z a -mmt=<코어수> <이름>.7z <이름>/*

하나의 파일 압축

7z a [생성할 아카이브 파일 이름] [압축할 파일 이름]

제일 빠른 압축

mx는 압축률이다 1이 가장 적은 압축률, 9가 가장 높은 압축률.
기본값은 5.

7z a -mx=1 archive.7z example.txt

빠르면서 멀티코어 압축

7z a -mx=1 -mmt=20 archive.7z example.txt

zip 압축해제

7z x <이름>.zip
unzip <이름>.zip

7z

7z x -mmt=40 <NAME>.7z

7z를 이용해서 압축을 푸는게 더 빠르다.

bz2

# Ubuntu
sudo apt-get install pbzip2 -y
# MacOS
brew install pbzip2
# CentOS/RHEL: 
sudo yum install pbzip2 -y

bz2로 단일 파일 압축

pbzip2 -9 -k titles_0000.txt

많다

# Ubuntu
sudo apt-get install pigz pbzip2 lbzip2 -y
# MacOS
brew install pigz pbzip2 lbzip2
lbzip2 -9 -k titles_0000.txt  # .bz2 생성
pxz -9 -k titles_0000.txt     # .xz 생성
pigz -9 -k titles_0000.txt    # .gz 생성
profile
Researcher & Developer @ NAVER Corp | Designer @ HONGIK Univ.

0개의 댓글