this program will compress files using the XPK system.
multiple pack modes can be specified, all of them will tested and the one with
the best compression factor will be used.
xPackBest can recursively compress a directory tree, optionally only files
which match a specified pattern.
usage:
xPackBest Input/A,Modes/M/A,MinRatio/K/N,BlockSize/K/N,Pattern/K
Input/A
data to compress, if a file only this file will be packed, if a
directory the whole tree will be packed recursively
Modes/M/A
mode to use for compression, contains of the name of the XPK sublib and
an integer value separeted with a dot, e.g. SHRI.100
MinRatio/K/N
minimum of compression ratio in percent that a file will be saved,
default is 3% which means that the filesize must be reduced by at
least 3%
BlockSize/K/N
the blocksize of the filesystem, this is used to decide if to skip or
store a compressed file, the compression must save enough bytes so that
at least one block less is required to store the file. e.g. with a
blocksize of 512 bytes a file of 513 bytes length must be compressed by
one byte to get saved, a file of 1023 bytes must be shortend by 511
bytes
default is 512, to deactivate this check set BlockSize=0
Pattern/K
standard AmigaDOS pattern specifing files in recursive mode to work on
RePack/S
switcher, when enabled already with XPK compressed files will be tried
to compress again
MinRatio and BlockSize are checking together, this means both must be
fulfilled to get a file saved and not skipped.
example:
that packs all diskimages of my WHDLoad installed games (the intention to
write this program ;-)
xPackBest HD42:Games MASH.100 SQSH.100 Pattern=disk.[0-9]
find . -type d -iname data* -exec xpackbest "{}" mash.100 sqsh.100 ";"
misc:
- the compression uses a task priority of -1
version 1.0 (27.04.01)
- initial release
version 1.1 (08.05.01)
- ^C support added
- compressing progress display added
version 1.2 (10.12.03)
- a leading "./" on the Input/A specified will be skipped now, this help
in conjunction with ixemul tools (e.g. find)
version 1.3 (17.02.05)
- when saving files it now preserves all meta data (date, flags, comment)
- option BlockSize/K/N added
version 1.4 (26.05.05)
- files of a length of 0 bytes no longer break an recursive run (thanks to
Christian Ville for report), files smaller than 48 bytes are no longer
tried to compress (because of XPK headers it will never become smaller)
- the program now checks if the files are already compressed using XPK,
when compressed it skips these files except the new option RePack/S has
been enabled, then all files are tried to copmress as in previous versions
May the source be with you...
|