Какой софт может налету перепаковать файл ZIP, используя другую степень сжатия?

Имеется файл zip. Необходимо без предварительной распаковки архива (допустим, через pipe) перепаковать налету в новый архив, используя более сильную/слабую степень сжатия.
Это возможно? Если да, то как?
  • Вопрос задан
  • 369 просмотров
Решения вопроса 1
2ord
@2ord Автор вопроса
Похоже, утилита AdvanceCOMP advzip выполняет то, что мне и нужно.
advzip -z -3 test.zip
-z, --recompress ARCHIVES...
Recompress the specified archives. If the -1, -2, -3, -4 options are specified, it's used the smallest file choice from: the previous compressed data, the new compression and the uncompressed format. If the -0 option is specified the archive is always rewritten without any compression.
...
-1, --shrink-fast
Set the compression level to "fast" using the zlib compressor.
-2, --shrink-normal
Set the compression level to "normal" using the 7z compressor. This is the default level of compression.
-3, --shrink-extra
Set the compression level to "extra" using the 7z compressor. You can define the compressor iterations with the -i, --iter option.
-4, --shrink-insane
Set the compression level to "insane" using the zopfli compressor. You can define the compressor iterations with the -i, --iter option.
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 2
Да, возможно. Например, перепаковать с 9 степенью сжатия:
unzip -p ./filename.zip | zip -9 ./filename2.zip -
Ответ написан
urtow
@urtow
*nix, python, QA, bagpipe, folk music
Тот же 7z может распаковывать в stdout и читать из Stdin.

-si[{name}]: read data from stdin
-so: write data to stdout


То есть это будет выглядеть вот так 7z -so archive | 7z -si archive
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы