I wish to use info-zip in a for loop to change the compression type/level on zips that are not having any changes (e.g. files updated) made to them except the compression change.
Specifically I have an source tree where some items are zipped with -5 & to put them into backup medium I want to change them to -Z bzip2 & then when they need to be restored do a similar operation to -9 with out changing the file names if possible. (changing file extension to bz2 would be fine).
Please assist me in how to do this asap.
Thank you.
> Please assist me in how to do this asap.
We seem to have missed that goal. Sorry about the (very) delayed
response.
So far as I know, there's no way to transform the compression method
(or level) of an archive member other than to extract it, and
re-compress the extracted (original) data using different compression
parameters.
Also, Zip offers no simple way to alter the path/name of an archive
member as it's added to an archive, so any extract(UnZip)+replace(Zip)
operation might need to work in a directory tree which replicates the
original directory tree structure. (In a typical UNIX-like environment,
this constraint should not cause any serious problems.)