🖥Сжатие файлов в архивы gz с помощью gzip, и shutil
Элементарно, нам понадобятся функции gzip.open и shutil.copyfileobj:
import gzip import shutil
def compress_file(input_file, output_file): with open(input_file, 'rb') as f_in: with gzip.open(output_file, 'wb') as f_out: shutil.copyfileobj(f_in, f_out)
🖥Сжатие файлов в архивы gz с помощью gzip, и shutil
Элементарно, нам понадобятся функции gzip.open и shutil.copyfileobj:
import gzip import shutil
def compress_file(input_file, output_file): with open(input_file, 'rb') as f_in: with gzip.open(output_file, 'wb') as f_out: shutil.copyfileobj(f_in, f_out)
Hui said the messages, which included urging the disruption of airport operations, were attempts to incite followers to make use of poisonous, corrosive or flammable substances to vandalize police vehicles, and also called on others to make weapons to harm police. As of Thursday, the SUCK Channel had 34,146 subscribers, with only one message dated August 28, 2020. It was an announcement stating that police had removed all posts on the channel because its content “contravenes the laws of Hong Kong.” Those being doxxed include outgoing Chief Executive Carrie Lam Cheng Yuet-ngor, Chung and police assistant commissioner Joe Chan Tung, who heads police's cyber security and technology crime bureau. Telegram channels fall into two types: Image: Telegram.
from us