English

Russian

SourceForge.net Logo

The documentation on FreeArc 0.40 

Ââåäåíèå_ 2

The purposes ñîçäàíèÿ_ 2

Installation in Windows 3

Installation in Unix_ 3

Format command ñòðîêè_ 3

The list êîìàíä_ 4

Search ôàéëîâ_ 4

The list îïöèé_ 6

The task îïöèé_ 13

Ïîäðîáíîñòè_ 14

Inquiries to ïîëüçîâàòåëþ_ 14

Text codings (charsets) 14

Processing îøèáîê_ 14

Enciphering äàííûõ_ 15

Protection and restoration äàííûõ_ 16

Differences from RAR_ 17

Technical îãðàíè÷åíèÿ_ 17

Adjustment(Option) ñîëèä-ñæàòèÿ_ 18

Sorting of files for ñîëèä-ñæàòèÿ_ 19

Updating ñîëèä-àðõèâîâ_ 20

Adjustment(Option) ñæàòèÿ_ 21

Types ôàéëîâ_ 22

Ìóëüòèìåäèà-ñæàòèå_ 23

Use ïàìÿòè_ 24

Maximal ñæàòèå_ 25

Detailed management ñæàòèåì_ 25

Decoding of algorithm ñæàòèÿ_ 25

Choice of algorithms ñæàòèÿ_ 27

Parameters of algorithms ñæàòèÿ_ 28

External êîìïðåññîðû_ 33

Block àëãîðèòìû_ 33

Config-file arc.ini 34

Section [Compression methods] 34

Section [External compressor] 36

The information for ðàçðàáîò÷èêîâ_ 37

Compilation from èñõîäíèêîâ_ 37

Addition in the program of new algorithms ñæàòèÿ_ 37

 


Introduction

The goals of creation

Many archivers existing now use only one algorithm to implement full range of compression modes – from the fastest up to the tightest. It leads to that speed of the archiver in these modes differs all in 5-6 times. Moreover, "extreme" modes remain ineffective, not giving the big gain on speed/compression in comparison with a default mode. Moreover, one algorithm of compression it is simple cannot to suit equally well for various types of data. As a result advanced users should hold near at hand the whole bag of archivers, choosing the most suitable from them depending on a concrete situation. Add to this that the majority of archivers have long-term history and, due to requirements of backward compatibility, their compression algorithms are far from ideal.

Therefore I have set for myself a goal of creation the archiver of new generation: having the big range of compression speed for the various tasks – from 100 kb/s up to 10 Mb/s, and squeezing out on every speed maximum possible! In order to reach this goal, FreeArc includes three best modern compression libraries: LZMA by Igor Pavlov, PPMD by Dmitry Shkarin and GRZipLib by Ilya Grebnov. Each of them has their own strengths – GRZipLib provides fast compression, PPMD – good text compression, LZMA – good compression for binary data and and very fast decompression. FreeArc groups files by data type (text, binary, multimedia, etc.) and chooses for each of these groups the most suitable compression algorithm. As a result to the user it is provided:

·         a choice of the best compression algorithm providing required compression speed

·         a choice of compression algorithm most suitable to concrete packed data

And notice – all it is implemented in one universal archiver suitable (I hope J) for all needs.

 

The second goal of this project was creation of the archiver:

·         reliable

·         easily portable to other platforms

·         easily expanded by new features (archive protection and recovery, generations of files, volume splitting, GUI)

·         capable to quickly and reliably process large amount of data

In order to archive these goals the archiver is implemented in language of ultrahigh level Haskell - portable, protecting from programming errors and allowing to easily describing the most complex algorithms.

 

My third goal was creation of the sample of the modern archiver, which source codes any interested person can easily investigate and adapt for his own purposes. In particular, now there are many cool compression libraries which do not receive a wide attention only because their authors are not going to write high-grade archivers. Having linked the library to the available archiver, it is possible to solve this problem easily.  

Installation in Windows

To install FreeArc on a computer, copy files arc.exe, arc.groups and arc.ini to directory included in PATH (all files should be in one directory).

In order to add to FAR support for FreeArc archives, you should have MultiArc plugin installed. Find directory where format sub-plugins are installed (...\Program Files\Far\Plugins\MultiArc\Formats) and copy here FreeArc.fmt. If it does not work for some reason – it is possible to use the alternative way of installation described in file FAR_MultiArc.addon.

In order to add such support to Total Commander, you should also have its MultiArc plugin installed and import freearc.addon to the plugin (in order to do it, set cursor to any file, press Alt-F5, "Settings", «Import addon» and select path to freearc.addon). Besides this, it is necessary to copy file unarc.exe to PATH.

Installation in Unix

Run make install. This command will copy all necessary files. Configuration files (arc.ini and arc.groups) will be placed to the directory /etc where you may further edit them.


Command line format

Work with FreeArc is made similar to work with console versions RAR and 7-Zip as much as possible. FreeArc has the same format of a command line, uses names of commands and options compatible to them (the preference is given to RAR as more widespread), and in general "behaves" the same as you have got used to expect from these programs. Therefore the most part of FreeArc features is stated only briefly, detailed descriptions are given only to unique abilities of the program.

 

The format of a command line is far from unique J:

arc Command Archive [filenames...] [@filelists...] [options...]

Filename masks may be written using standard “?” and “*” wildcards. It’s not necessary to specify names of files to process, mask “*” used by default. Names/masks of files to process can be read also from filelists where they should be written one-per-line. Options can be specified in any place of a command line. The format of a command line for one command has been above brought. It is possible to execute several actions (sequentially) in one FreeArc run – just separate commands with “;” (plus blanks), for example:

arc a ../archive2 -m2 -r -t ; a ../archive3 -m3 -r -t ; a ../archive4 -m4 -r -t

Default options are read from file arc.ini (placed to the same directory as arc.exe in Windows, and to the /etc directory in Unix), and from the environment variable FREEARC. You can disable their use or choose other setting by options -cfg and -env.

The list of commands

a

Add files to archive. Files with the same names, already existing in archive, will be overwritten

c

Set the archive comment. It is equivalent to a command ch –z

ch

Copy archive, changing it in passing. For example, these changes can be addition of comments to archive, closing it from the further changes, etc. If command line specify filenames – only these files are copied to output archive. The files specified in an option -x are excluded from archive (it is possible to tell, that the command ch leaves in archive just the same files which the command d would remove J). Unlike RAR, this command can be used to recompress/reencrypt archive with new options, for example arc ch archive -m5

create

Create new archive. Deletes archive if it already exists, and then operates as a command a

cw

Write the archive comment to a file: arc cw archive outfile.txt

d

Delete files from archive

e

Extract files from archive to the current directory (or the directory specified by an option -dp)

f

Fresh files in archive. It is equivalent to a command a -f

j

Join archives. The files specified in a command line should be archives. Their contents will be added to the basic archive. If in the basic archive and one of added archives there are files with identical names in the output archive there will be only a file from added archive. «Basic archive» may not exist prior to execution of a command; in this case existing archives will be joined to new one. Examples:

arc j new.arc old1.arc old2.arc

arc j new old[34]

arc j All_Together c:\* -r

k

Lock archive from the further changes. It is equivalent to a command ch -k

l

List files in archive

lb

Bare list of files in archive (filenames only)

m

Move files and directories to archive. It is equivalent to a command a -d

mf

Move only files to archive. It is equivalent to a command a -df

r

Restore damaged archive, using recovery record

rr [NN]

Add recovery record to archive. It is equivalent to a command ch -rr[NN]

t

Test files in archive, extracting them to memory and then checking CRC

u

Update files in archive and add new files. It is equivalent to a command a -u

v

Verbosely list files in archive. This command intended mainly for usage in file/archive managers

x

Extract files from archive with full directories

Search of files to process

All commands can be divided into two large groups: commands that create, update and join archives (a f u m mf create sync j) where filenames specified in cmdline mean files ON the DISK; all other commands that list/extract/delete files from archive where filenames specified in cmdline mean files IN the ARCHIVE.

 

Let's consider an example of a compression command: arc a backup makefile *.cpp *.h @projectfiles. At its execution all over again references(links) on fajllisty ( in this case it projectfiles) are replaced with their contents. Fajllisty can contain names and the masks of the files which have been written down postrochno, but cannot contain an option. Further, on a disk the files corresponding(meeting) each specified name or a mask are searched. If the option-r the files corresponding(meeting) each name/mask, are searched not only in the current directory, but also its(his) subdirectories is set. If the specification of a file includes a name of the directory files are searched in this directory and its(his) all subdirectories, for example the command arc a sources rtl \*.c-r will pack all files with expansion C in directory RTL c its(his) subdirectories. If in a command line names of processable files, for example “ arc a archive “ the mask “*” is automatically used, i.e. arkhiviruyutsya all files in the current directory (and its(his) subdirectories if the option “-r” is specified) are not specified.

The name of archive also can be set by a mask, thus files satisfying to a mask in current (or set obviously) the directory are searched all. We shall tell, the command “ arc a c: \archives \* great.nfo “ will add to all archives which are being the directory c: \archives, a file great.nfo. If the name of archive specified in a command line, does not contain “.”, to it(him,them) standard expansion “.arc” is automatically added; to prevent it it is possible, using an option - noarcext.

The command “j” in all is similar to commands of archiving, only in a command line in it(her) names of archives are specified, therefore at absence in these names “.” To them also it is added “.arc”. In particular, to merge all archives on disk C in one it is possible a command “ arc j All_Together c: \*-r ”.

At the task of the base directory for a disk –dp arkhiviruemye files are searched by an option concerning this directory – in the same way as though it(he) was current.

  

For all other commands the names specified in a command line, designate files in archive. References(links) on fajllisty (@listfile) are in the same way replaced with their contents. If the name is set without the instruction(indication) of the directory it corresponds(meets) to files in any directorys, for example *.txt includes both readme.txt and src \history.txt. If the name is set with the directory it corresponds(meets) only to files in this directory – files in any other directorys, including its(his) subdirectories, do not approach(suit). At use of an option - fullnames names without directorys correspond(meet) only to files in the root directory, i.e. *.txt will not include any more a file src \history.txt.

The name of processable archive can be set by a mask, and to it(him,them) at absence of expansion is automatically added “.arc”. Besides the option “-r” in these commands means recursive search in subdirectories of PROCESSABLE ARCHIVES. So, the command “ arc t c: \*-r ” will test all archives on disk C, and the command “ arc d c: \* *.bak-r ” – will remove from them files “*.bak”.

The option–dp in these commands means that directory on a disk which will be considered(examined) as current at extraction of files from archive.

 

For all commands by means of an option “-x” it is possible to exclude a part from the found files: so, the option “-xcommon.h” excludes files common.h, “-x*.bak” – all files with expansion “bak”, and “-x@exclude.lst” – all files which specifications are listed in a file exclude.lst. Thus, if the name/mask of a file does not include a symbol “/” or “\”, it(she) is compared with so-called « a base name » file (i.e. a name without the directory), differently – to a full name of a file. For exception of the whole directory use "-xdir/* ".

Additional criteria of selection of processable files can be set by options-ac, -n,-sl,-sm,-ta,-tb,-tn,-to. Thus selection on attributes of a file while operates(works) only during archiving as attributes of files are not kept inside archive.

The option–ap sets the base directory inside of archive – i.e. at archiving it(he) is added to names of packed files, and at unpacking leaves from names, and the files which are not entering into this directory, are completely ignored.

In masks it is possible to use designations “?” (designates any symbol), "*" (designates any sequence of symbols, including empty). In names of directorys of a mask are not supposed.

Archives processable by a command and time(temporary) files of the archiver are automatically excluded from processing – i.e. there is no danger, that they will be added in archive, or rewritten by the files taken from archive.

If after operation of updating of archive in it(him) there was no file (for example, all files have been erased, or any file it has not been found for archiving, or any of arkhiviruemykh did not manage to be opened files) the created archive leaves.

The list of options

Each option has the long name, the majority of options – simultaneously with it(this) still and short.

-ac

- ClearArchiveBit

To dump(reset) attribute Archive at successfully packed/unpacked files on a disk

-ad

- adddir

To add a name of unpacked archive (without expansion) to a name of the directory where there will be a unpacking. For example, the command “ arc x *-ad ” will unpack all archives in the current directory in subdirectories with the same names. At use simultaneously with an option-dp the name of archive is added right at the end

-ae

- encryption

Sets algorithm or sequence of the algorithms used for enciphering of compressed data. Details see in section Enciphering of data

-ag

- autogenerate

Automatic generation of a name of archive. To a name specified in a command line, the information on current date and time is added. For example, “backup.arc”-> “backup20050302114328.arc”. It is possible to specify obviously also a format added to a name of archive of a line in format si-øíîé of function strftime ()

-ao

- SelectArchiveBit

To choose at archiving only files with established(installed) attribute Archive (does not work at unpacking that attributes of files inside of archive are not kept yet)

-ap

- arcpath

The base directory inside of archive

-cfg

- config

Adjustments(Options) are by default read from a file arc.ini and variable FREEARC environment. This option allows or to disconnect(switch-off) their use (-cfg-), or to set other ini-file (-cfg=alternative.ini). For use of other variable environment use an option-env

-d

- delete

To remove successfully sarkhivirovannye files and directorys upon termination of packing

-df

- delfiles

To remove successfully sarkhivirovannye files upon termination of packing (but to not delete directorys)

-di

- display

Supervises volume of the information on process of the work deduced(removed) by the program. This option is set by a character set, for example - display=fts where each symbol includes a conclusion of the certain portion of the information:

·         h – number of the version of the archiver

·         o – the additional options received from arc.ini/FREEARC

·         a – a name of created archive

·         c – a method of compression

·         m – volume of used memory

·         n – usual messages (about creation sfx, removal(distance) of the compressed files, etc.)

·         w – preventions(warnings) (warnings)

·         r – messages on addition to archive recovery records

·         f – the final information on a degree of compression of files

·         d – the final information on a degree of compression of the directory of archive (it is deduced(removed) only if the directory> 10 kb)

·         t – the final information on speed of compression

·         s – results of results:) for the commands which have processed more of one archive

·         e – an empty line in the end of work of the program

·         $ - a conclusion of the debugging information to the screen

·         * - a conclusion of the debugging information in logfajl

Adjustment(Option) “hanwrftse” is by default used, the option–di without parameter includes a conclusion of all accessible information (except for debugging). Pay attention, that in logfajl in any case all is written. Also it is possible to switch on and off a conclusion of separate parts of the information by means of –di+… and–di–….

-dm

- dirmethod

Method of packing of the directory of archive and other service blocks. All opportunities are similar to an option-m. By default-dm=lzma:1m. If you do not want, that the directory of archive has been packed – use an option-dm0. Consider, that FAR MultiArc plugin can come only into archives which directorys are packed by methods lzma and storing (as other methods do not give any advantages for compression of directorys, their support has not been included at assembly of a plug-in).

-dp

- diskpath

The base directory on a disk. For example, the command “ arc x archive-apdir1-dpdir2 ” will take all files from the directory dir1 inside of archive in the directory dir2 on a disk

-ds

- sort

To define(determine) the order of sorting of files at archiving or to disconnect(switch-off) sorting. Look details in section Sorting of files for ñîëèä-compression Error! Bookmark not defined..

-ed

- nodirs

To not add empty directorys in archive

-env

Options are by default read from variable FREEARC environment. This option allows or to disconnect(switch-off) its(her) use (-env-), or to set reading options by default from other variable (-env=VARNAME environment. Pay attention, that reading of options from FREEARC also is disconnected(switched-off) at the task-cfg- (it is made for convenience of users and compatibility with RAR)

-ep

- ExcludePath

Excludes a part of a way from a name of the file which is written down in archive, or on the contrary – expands it(him) to a full name of a file on a disk:

·         -ep0 – writes down a naked name of a file without the directory

·         -ep1 – excludes from a name of a file a part set in a command line

·         -ep2 – expands a name to a full name of a file on a disk, except for “ d: \ ” or “/” parts

·         -ep3 – writes down a full absolute name

At unpacking absolute names obrezayutsya if the option-ep3 is not specified.

-f

- freshen

To update existing files (at packing or unpacking)

-fn

- fullnames

In commands d, e, x, t, l, v the names of files specified in a command line, concern to files inside of archive. Thus there is a question – whether they designate a full name of a file or only a name without a name of the directory? The answer: if the name includes “/” or “\” or this option is included – that it is treated as a full name

-hp

- HeadersPassword

Inclusion of enciphering of compressed data and headings of archive and, optsionalno – the task of the password. Details see in section Enciphering of data

-i

- indicator

Choice of the indicator of progress:

·         -i0 – disconnects(switches-off) a conclusion of the indicator, including in heading of a window

·         -i1 – shows only, on how many the task (adjustment(option) by default) is carried out of percent(interests)

·         -i2 – in addition deduces(removes) a name of each processable file to similarly how it is done(made) in the majority of archivers

-k

- lock

To close created archive from the further changes

-kb

- keepbroken

At unpacking - to not delete files at which unpacking mistakes(errors) have been found out. You can try to restore data from these files manually.

At packing – to not delete the created temporary file of archive even if in it(him) mistakes(errors) are found out

-kf

- keyfile

Sets a file-key used for enciphering of data. Details see in section Enciphering of data

-lc

- LimitCompMem

To limit the volume of memory used by algorithm of packing. By default the program uses no more than 75 % of volume of physical memory of a computer, but by means of this option you can cancel restriction or change it(him) is see Use of memory

-ld

- LimitDecompMem

In the commands creating archive, limits volume of memory which will be necessary for unpacking created archive. In commands of unpacking can reduce requirements to memory if the algorithm allows to keep intermediate data on a disk. By default–ld75 %. See Use of memory

-m

- method

Method of compression. Options-m1 ..-m9 establish(install) various modes of packing – from 16 Mb of memory fastest and demanding only, up to the slowest and using 4 gb both at packing, and at unpacking. Options-m1x ..-m9x include dissymetric algorithm of compression (LZMA) in which it is necessary for unpacking in 10 times of less time and memory, but it is necessary to pay for it reduction of speed of packing and a degree of compression. In modes m1/m2/m3/m4/m5 the program compresses at a level zip/uharc-mz/rar/7-zip/uharc-mx, accordingly, working thus in 2-3 times more quickly. Other details see in section Adjustment(Option) of compression  Error! Bookmark not defined.. Also the mode-m0 (switching-off of compression) is traditionally supported(maintained).

 -max

Mode of the maximal compression with use of the built in and external algorithms (now it is realized as–m9p with automatic reduction of requirements to memory if necessary)

-mc

Allows to disconnect(switch-off) separate algorithms of compression and group of files, supporting(maintaining) including RAR-compatible syntax:-mct-, -mce-and t.d.. Details in section Multimedia-compression

-md

- dictionary

To set the size of the block/dictionary for algorithms of compression. Corrects(adjusts) adjustments(options) of the algorithms set in an option–m

-mm

- multimedia

Operates multimedia-compression

-ms

- StoreCompressed

(Almost) to not try to compress already packed files. What files are already packed – is defined(determined) on their names so mistakes(errors) here are possible(probable) and consequently this option is not included by default. Details look in section Types of files.

-mt

- MultiThreaded

Management of use of a multithreading at packing/unpacking:

·         –mt0 – an automatic choice of optimum quantity(amount) tredov depending on type of the processor (by default; also can be set as–mt +)

·         –mt1 – one tred (to disconnect(switch-off) a multithreading; also can be set as–mt–)

·         value there is more than unit – quantity(amount) tredov which should be used

In practice this option meanwhile influences only packing by algorithm LZMA in modes normal and above (i.e.–m4 and above) where at packing it can be used two treda simultaneously. However, many processes in the program and so rasparalleleny without dependence from value of this option – in particular, all the algorithms entering into a chain of algorithms of packing and unpacking, are carried out in parallel.

 -mx

Mode of the maximal compression with use only the built in algorithms (now it is realized as–m9 with automatic reduction of requirements to memory if necessary)

-n

- include

Additional selection processable falov on names/masks. For example, a command:

arc a a project1/* project2/*-n*.cpp-n*.h-n*.hpp

Selects in directorys project1 and project2 only files with expansions cpp, h and hpp. It is possible to use and a file-lists, set by means of @filelist, for example:

arc a a project1/* project2/* -n@cppfiles.lst

-o

- overwrite

Mode of rewriting of files at unpacking:

·         –op – to give out inquiries about rewriting (adjustment(option) by default; has see undressed Inquiries to the user)

·         –o + – not setting inquiries to rewrite all files (it is similar to the answer “a”;–o +–u it is similar to the answer “u”)

·         –o––not setting inquiries to pass(miss) all files (it is similar to the answer “s”)

The program will suggest to rewrite what files, also depends on options–f and–u.

-okf

- OldKeyfile

Sets the old key files used only for unpacking of data. Has see undressed Enciphering data

-op

- OldPassword

Sets the old passwords used only for unpacking of data. Has see undressed Enciphering data

-p

- password

Inclusion of enciphering of compressed data and, optsionalno – the task of the password. Details see in section Enciphering of data

-r

- recursive

Recursive search of the set files in set (or current) the directory and its(his) subdirectories

-rr

- recovery

To add to archive recovery record the set size. It is set in the form of:

·         –rrSIZE – to add recovery record the set size in bajtakh, for example–rr1mb

·         –rrN % or–rrNp – to add recovery record with a size in percentage of size of archive, for example–rr2 %

·        –rr––to disconnect(switch-off) the further addition recovery record

The option–rr without parameter sets use recovery record with volume by default: 4 % for archives up to 500 kb, 2 % for archives up to 2 Mb, 1 % in other cases (if in archive already is recovery record its(her) former volume will be used). Use recovery record allows to restore consecutive damage of archive if it does not surpass on the size recovery record; at inconsistent character of damages the probability of successful restoration decreases.

-s

- solid

Operates the size of the ñîëèä-block and splitting into parts of the directory of archive. By default the size of the ñîëèä-block makes 1 gb, and the directory is segmented, describing on 20 thousand files. The option–s16m will change the size of the ñîëèä-block to 16 Mb,–s100f will create ñîëèä-blocks on 100 files, and–se will create the separate ñîëèä-block for each expansion of files. The detailed description of this option see in section Adjustment(Option) of ñîëèä-compression  Error! Bookmark not defined..

-sc

- charset

Adjusts(Sets up) the codings used for listfajlov, files of comments, etc. It is compatible on a format both with RAR, and with 7-zip. Details see in section Text codings (charsets)

-sl

- SizeLess

To select files with a size strictly less set. Examples:

-sl8m

-sl5120

-sm

- SizeMore

To select files with a size strictly more set (see also–sl)

-t

- test

To test the created archive after packing. The further actions, including removal(distance) sarkhivirovannykh files, are carried out only at successful result of testing. The archive which has appeared sbojnym, is erased if the option–kb is not set

-ta

- TimeAfter

To select files with time of updating equal or greater(big) specified. The parameter is set in format YYYYMMDDHHMMSS, and it is possible to include any non-numerical symbols in it(him) for presentation – they are ignored. At insufficient number of figures addition in zero on the right is made. Examples:

-ta2007--02-23

-ta2007--07-01_12:00

-ta2

-tb

- TimeBefore

To select files with time of the updating previous specified in parameter, in all rest it is similar to an option–ta

-tk

- keeptime

To keep that time of updating of archive which it(he) had before operation

-tl

- timetolast

To establish(install) time of updating of archive for the period of updating the freshest file in archive

-tn

- TimeNewer

To select files which have been changed during the set time interval. The parameter enters the name in a format [<ndays> d] [<nhours> h] [<nminutes> m] [<nseconds> s]. Examples:

-tn7d

-tn1h20m

-to

- TimeOlder

To select files which did not change during the set time interval. In the rest it is similar to an option–tn

-tp

- pretest

Mode of testing of archive before performance of operation above it(him):

·         –tp0 – to test nothing (also it is set as–tp–)

·         –tp1 – to check recovery record, at its(her) absence –  to do(make) nothing (adjustment(option) by default)

·         –tp2 – to check recovery record, at its(her) absence – to test archive (also it is set as–tp and–tp +)

·         –tp3 – to check recovery record and then to test archive

-u

- update

To update existing files and to add new (at packing or unpacking)

-w

- workdir

To set the directory for time(temporary) files. At updating archive the new version of archive is created in this directory, upon termination of packing the old archive leaves and on its(his) place this file is transferred(carried). If options–t and–w are used simultaneously testing of the created archive is made twice – before its(his) carry from the time(temporary) directory and after that. It is possible to set in the form of the reference(link) to a variable of environment(Wednesday), for example–w%TEMP.–w without parameter it is equivalent–w%TEMP

-x

- exclude

To exclude from processing the set files or files from set a file-lists, for example arc a backup-r-xcommon.h-x*.bak -x@exclude.lst-xdir/*. Details see in section Search of files.

-y

- yes

Automatically to answer "yes" all inquiries to the user (it is convenient for unattended operation). See  Inquiries to the user

-z

- arccmt

In the commands creating archive, adds to archive the comment:

·        (by default) – the comment is copied from initial archive

·        –z––the comment leaves at updating archive

·        –z – the comment is entered with stdin

·        –zFILENAME – the comment is read from the set file

In commands of unpacking (e/x/t) writes down the comment of archive in the set file (similarly command cw).

The archival comment is deduced(removed) at all operations with archive. Especially it(he) has great value for self-unpacked archives as it is deduced(removed) before its(his) unpacking and allows the user to solve, whether it is necessary for it(him) to unpack the given package

 

- append

To add new files in the end of archive, not pereupakovyvaya existing ñîëèä-blocks. In particular, thus it is possible to create archive in some receptions, using different options on each step:

arc a sfiction-r -s16m-m5b *.doc

arc a sfiction-r -s1m -m4t-x*.doc - append

See Updating of ñîëèä-archives

 

- cache

To set the size of a cache of anticipatory reading. Keshirovanie accelerates archiving big kol-âà fine files when the most part of an operating time of the archiver is necessary not on actually packing, and on readting through all these files from a disk – acceleration can reach(achieve) 30-50 %! See details in section Use of memory

 

- crconly

To not write down in archive the packed data, but to calculate and remember CRC arkhiviruemykh files. This option can be used to check up later – whether files have changed

 

- dirs

To add empty directorys in archive. Without the instruction(indication) of this option, FreeArc adds empty directorys only in that case when files are added all, i.e. it is obvious or the mask “*” is implicitly specified, and options of selection of files by various criteria (-n/-ta/-tb/-tn/-to/-sl/-sm) are not used. It is opposite to an option–ed (-nodirs)

 

- groups

Name of the file setting the order of sorting of files for improvement of compression and describing types of files. By default it arc.groups from that directory where there is a program. Details about its(his) format look in sections Sorting of files for ñîëèä-compression Error! Bookmark not defined., Types of files.

 

- logfile

To specify a name logfajla where the information on all carried out operations and error messages will enter the name. This option is convenient for adjusting(for setting up) in arc.ini or variable FREEARC environment; an example: - logfile=c: \temp \freearc.log

 

- noarcext

If the name/mask of archive is specified without expansion to it(him,them) expansion “.arc” is automatically added. To prevent it it is possible only one way – to use an option - noarcext J. It concerns and to names of the archives united by a command “j”. This option first of all is intended for konfigurirovaniya arkhivatornykh environments, you can see examples of its(her) application in adjustments(options) of commands in plug-ins to FAR and Total Commander.

 

- nodata

To not write down in archive the packed data, having left only the directory of archive. This option can be used for cataloguing files instead of their packing. Moreover, it is possible to transform usual archive into the directory of files a command arc ch archive - nodata

 

- nodir

To not write down in archive the directory sarkhivirovannykh files. This option is interesting only to testing archivers – to merge set of fine files in one big by way of, defined(determined) by an option-ds

 

- print-config

To deduce(remove) definitions of methods of compression. See details in section the Config-file arc.ini

- recompress

At updating archive perepakovyvaet all data, using current adjustments(options) of compression. This option can be used when for you the degree of compression of archive, rather than time of its(his) updating (see Updating of ñîëèä-archives) is more important

 

- sync

Synchronization of contained archive with a set arkhiviruemykh files. Simultaneously updates the out-of-date files in archive, adds new and deletes ischeznuvshie. At unpacking it is ignored. This option is intended mainly for future use with the archives storing(keeping) generations of files; however, it(she) also can be used for fast reduction of archive contents of a disk without perepakovki already compressed files

 

--

To stop processing options. After "-" further in a command line it is possible to use any names of files, including beginning with a symbol “-“

The task of options

The most part of options is simply bulevskie flags, they are set without any arguments. Opposite value either is used by default, or can be set by the same name with a prefix “no”, for example - dirs and - nodirs. Value by default for many options can be restored, using as parameter two minuses, for example-z-; it can be useful if it is necessary to cancel the value of an option set in a config-file arc.ini

If the option accepts parameter it(he) can be set directly or after a sign “=”, for example options-dsen and-ds=en – are equivalent. It is supposed, that use “=” can promote increase of readership of a command line, especially at use of long names of options. With the same purpose, by the way speaking, the long variant of a name is given out to each option. I recommend to be guided by long names of options at creation of batch-files, scripts, adjustment(option) arkhivatornykh environments and to that similar.

Options–s and–m have the intricate format which is described in separate sections: Adjustment(Option) of ñîëèä-compression  Error! Bookmark not defined. And Adjustment(Option) of compression Error! Bookmark not defined..

In the options accepting as parameter the size in bajtakh, it(he) can be set in the next ways:

·        with a suffix “b”, that means bajty: - cache65536b

·        with a suffix “k”, that means kilobytes: - cache256k

·        with a suffix “m”, that means mbytes: - cache10m

·        with a suffix “g”, that means gigabajty: - cache1g

·        with a suffix “^”, that means a degree of the two: - cache23 ^ sets kesh in 2^23 bytes, i.e. 8 mbyte


Details

Inquiries to the user

From inquiries to the user the inquiry about rewriting a file existing on a disk – new, taken of archive (see the description of an option–o) is supported(maintained) only. It(he) is set in the form of “ Overwrite <file> (y/n/a/u/s/q)? ” And answers to it(him) are interpreted as follows:

·         “y” means “Yes” – to rewrite a file

·         “n” means “No” – to leave file already existing on a disk

·         “a” means “Always” – to rewrite all files, not setting there are more than inquiries

·         “u” means “Update” – to update files fresher, not setting there are more than inquiries

·         “s” means “Skip” – to pass(miss) all files, not setting there are more than inquiries

·         “q” means “Quit” – to leave the program

·         at the wrong answer the help is deduced(removed)

 

The option–y sets the answer "yes" on all inquiries to the user (in the future – not only about rewriting), that creates an opportunity for automatic work of the program without participation of the user.

Text codings (charsets)

Inside of the program text data are represented in 32-bit Unicode. At reading/record on a disk these data, as a rule, should be presented in other coding. The option-sc (-charset) allows to change a part of codings, others are sewn rigidly up in the program. In the following table the codings used by the program by default in Windows and Unix, and a way of their change are listed:

 

Windows default

Unix default

Way of change

File-sheets

OEM

UTF-8

-sclCHARSET

Files of comments

OEM

UTF-8

-sccCHARSET

arc.ini/arc.groups

OEM

UTF-8

-sciCHARSET

Screen in/in

OEM

UTF-8

 

Command line

ANSI

UTF-8

 

Names of files in FS

UTF-16

UTF-8

 

Names of files inside of archive

UTF-8

UTF-8

 

 

Where CHARSET can accept one of values: OEM, ANSI, UTF-8 and UTF-16. Also record of this option in the form of, compatible with RAR and 7-zip is supported(maintained).

Processing of mistakes(errors)

Messages about arising during work of the program mistakes(errors) are deduced(removed) on stderr and duplicated in logfajl. Some types of mistakes(errors) lead to preschedule end of the program – they are classified as fatal errors, others allow to continue work – they are classified as warnings. In the end of work the program prints êîë-in warnings or “ All OK ” if neither mistakes(errors), nor preventions(warnings) were not. A code of end of the program:

·        0 – at absence of mistakes(errors)

·        1 – at presence only preventions(warnings)

·        2 – at a fatal mistake(error)

·        255 – at an output(exit) on Ctrl-Break

Some mistakes(errors) of work with files are ignored: it concerns to mistakes(errors) of removal(distance) of files at carry to archive and to mistakes(errors) of installation of attributes at use of an option–ac.

Enciphering of data

If data in archive are ciphered, they cannot be taken without knowledge of the password. If it is ciphered still and the service information of archive it is impossible to learn(find out) in general anything about files containing in archive. Enciphering is supervised by following options:

·        the Option–p [PASSWORD] includes enciphering compressed data and optsionalno sets the password used for enciphering

·        the Option–hp [PASSWORD] includes enciphering And data, And the service information, and optsionalno sets the password

·        the Option–kf=FILE defines(determines) keyfile (file-key) used as the additional password

·        the Option–opPASSWORD allows to set the additional passwords used only for decoding

·        the Option–okf=FILE allows to set additional keyfiles, used only for decoding

·        the Option–ae=… sets algorithm or sequence of the algorithms used for enciphering

 

At the task of an option–hp (with parameter or without) headings will be ciphered Both data, And. If the option–p data will be ciphered only is set only. It does(makes) more convenient viewing of archive, but keep in mind – considerably reduces a level of protection as at this all data about names of files will be accessible, their sizes and CRC. If the option–kf sets a file-key its(his) contents will be added to any used password is allows to increase considerably reliability of enciphering, preventing any attempts of breaking of archive by search under the dictionary.

If the password is not specified neither in an option–p, nor in–hp, and the file-key the password will be requested of the user in a mode of invisible input is not used. At archiving data the password needs to be entered twice, at unpacking – only once. Also the password will be requested at use of the "interrogative" version of an option:–p? Or –hp?. If the "negative" version of an option ––p–or–hp–the password on the contrary will never be requested and if any data are ciphered the program will simply deduce(remove) the message is specified, that they cannot be deciphered. It is useful for automatic start – to be assured(confident), that the program will not hang in infinite expectation of input of the password.

You also can set old passwords an option –op and old keyfiles an option–okf. Unlike the passwords/keyfiles set in options–p/–hp/–kf, these(it) will never be used for enciphering data – only for decoding. At decoding the program checks all the passwords specified in options–p/–hp/–op and entered from the keyboard, in a combination to all keyfiles, specified in options–kf/–okf and separately (passwords without keyfiles, keyfiles without passwords), and only then other password requests.

Using a command of updating of archive with options–op and-or–p, you can cipher, decipher or re-cipher archive:

arc ch archive-p [PWD] [-hp] [-kf..] [-ae =..] - recompress

arc ch archive-op [PWD] [-okf..] - recompress

arc ch archive-op [OLDPWD]-p [NEWPWD] … - recompress

 

The option–ae chooses algorithm of enciphering: aes, blowfish, serpent or twofish, to which it is possible to add the size of a key in bats and potokovyj a mode (ctr or cfb), for example:–ae=blowfish-448/ctr. The size of a key can vary in following limits: aes, serpent, twofish: 128, 192, 256; blowfish: 64..448. The key of the biggest length admissible for given algorithm and mode CTR is by default used. Besides it is possible to establish(install) êîë-in roundes of enciphering through parameter:r and êîë-in iterations at calculation of a key of enciphering through:n. An example:–ae=aes-128:r20:n2000. At last, it is possible to set consecutive application of several algorithms of enciphering, thus an output(exit) of the first algorithm zashifrovyvaetsya the second, etc., and the output(exit) of last algorithm enters the name in archive, for example:–ae=aes-128+serpent:n5000+twofish/cfb. Algorithm AES with standard adjustments(options) is by default used. Certainly, the algorithms of enciphering used for everyone block with all of them adjustments(options) are kept in archive so this option defines(determines) only a way of enciphering of new blocks.

Technical details: with each ciphered block it is kept salt with the size equal to the size of a key of enciphering, and IV with the size equal to the size of the block of enciphering (64 bat for blowfish, and 128 bats for aes, serpent, twofish). The key of enciphering is calculated proceeding from the password/key of the file mixed with salt, algorithm PKCS*5.2/SHA-512, it(him) êîë-in iterations is set by parameter:n, and is by default equal 1000. If the block is ciphered by several algorithms consistently (type–ae=aes-128+serpent+twofish) it is natural to each of them the are created salt and IV. For generation salt/IV the cryptographic generator of random numbers FORTUNA-SHA512/AES is used.

I shall notice, that you can easy specify options–kf,–ae in a config-file. Their presence in itself does not include enciphering – it joins only options –p and–hp. Certainly, here you can place and options–op/–okf, possible(probable) passwords describing all and keyfiles by which data unpacked by you can be ciphered.

For generation keyfile you can use a following method: take an any file srcfile in the size 1-10 kb and cipher its(his) command arc a keyfile. srcfile -p1 - nodir

Protection and restoration of data

FreeArc provides opportunities of protection and restoration of the data, similar with accessible in RAR and other archivers: it is possible to include the additional block of data named recovery record in archive, formed by means of operations XOR from sectors of archive. This block of data allows to check integrity of archive before any operations with it(him), and to restore contents of archive at detection of failures. In practice it(he) successfully copes with distortions of data because of failures in magnetic carriers(bearers). Use of means of protection and restoration of data is broken into three stages:

·        you use an option–rr for addition recovery record during archiving or a command rr for addition recovery record to already existing archive

·        At presence in archive recovery record, before any operation with archive its(his) contents are automatically checked with its(her) use. At detection of failures the further actions are not made, however the archive is not restored automatically. This precheck copes an option–tp and at corresponding(meeting) adjustment(option) can be made even at absence in archive recovery record – by full testing archive. The option–t sets full testing archive after its(his) updating. Maximal êîë-in every possible checks it is possible to organize a combination of options–tp3 –rr–t J

·        If the program has found out failure in archive it(she) will advise you to use a command r for its(his) restoration. This command uses recovery record for restoration of contained archive and writes down the restored archive in a file fixed. <arcname>. The restored archive does not contain recovery record so it(her) will have to add anew

It is necessary to notice also, that if failure "will cover" the central directory of archive and it(he) will not manage to be restored completely it will mean loss of all data in archive! Unfortunately, splitting of the central directory into small pieces (for example, an option–s8m;) will not solve a problem completely as in the program while there is no opportunity of search of the "lost" pieces of a table of contents of archive at its(his) restoration. Therefore at present reliability of protection of data concedes on level RAR’îâñêîé. It is planned to correct in following versions of the program.

Differences from RAR

Though FreeArc it is focused on the maximal compatibility with RAR by way of identical behaviour of commands and options with the same names, between them all is tiny distinctions:

·        –md64 means the dictionary of 64 Mb

·        various formats of argument of a command–ag; notice, that at use–ag without parameter both programs work equally

·        an option–rr "zalipaet" - its(her) argument enters the name inside of archive and will be involved at all subsequent commands of updating of archive down to those times while new value–rr will not be obviously set in a command line; therefore for switching-off of the subsequent additions recovery record to archive it is necessary to use an option–rr–

·        the command r does not scan archive in searches vosstanovimykh directorys – it(she) restores only that it is possible to restore by means of recovery record

·        –zFILENAME works also at unpacking, taking the comment of archive in the set file

·        the mask makefile.* does not include a file without expansion makefile

·         the command a–df is equivalent to a command mf, and a–d is equivalent to a command m, unlike RAR where a–df it is equivalent to a command m

·        at use of options of selection of files-n/-sl/-sm/-ta/-tb/-tn/-to empty directorys are not added in archive (for example, in a command arc a archive-r-sm10kb)

Technical restrictions

The sizes of processable files and the archive are limited 2^63 bytes, and êîë-in files in archive – by 2 billion. Both these restrictions are not basic and will be increased, as soon as there will be a necessity.

In practice êîë-in files in archive it is limited only kol-âîì to the accessible program of physical memory. The information on one file borrows(occupies) of 500 bytes in memory of the order. If to consider, that memory also is required for algorithms of packing and unpacking, operational system, programs, etc. we shall see, that by the machine(car) with 2 Gb it is possible for memory is high-grade to work with the archives containing up to 3 million of files.

At unpacking from archive only to a part of files in used memory it is proportional to quantity(amount) of unpacked files. Thus, you can unpack the archives containing though millions of files, in parts, having the machine(car) of all about 32 Mb of the RAM.

If between packing and unpacking of a file has occured(happened) change of shift of time rather UTC (as happens in regions with daylight saving time if packing occurs(happens) in the summer, and unpacking in the winter or on the contrary) time of the unpacked file can differ on an hour from what the original had. How much(As far as) I understand, it is the general(common) problem for Windows-programs.


Adjustment(Option) of ñîëèä-compression

As is known, for improvement of compression of their small files it is necessary to unite in the general(common) blocks which are compressed as one big file. This process the option–s operates. Examples of its(her) task:

-s16m

To create blocks in the size in 16 Mb. Rules of the task of the sizes look in section the Task of options

-s100

To create the blocks containing on 100 files

-se

To create the separate block for each expansion of a name of files

-s

To merge all files in one block

-s-

To disconnect(switch-off) ñîëèä-compression, i.e. to create the separate block for each file

The option–s1gb is by default used. Probably also application of two or three criteria simultaneously, for example-se10m100f will create the blocks containing files with identical expansion, but no more 10 Mb and no more than 100 files in one block. By the way, pay attention, that « the size of the ñîëèä-block up to 10 Mb » is treated by the program as « the total size of files in the ñîëèä-block, except for the last, should not exceed 10 Mb » or differently « provide, that êîë-in the superfluous data unpacked at extraction of unique files, did not exceed 10 Mb ».

At use of block algorithms, the size of created ñîëèä-blocks will be limited by the size of the block of data in used algorithm (to do(make) ñîëèä-blocks of greater(big) sizes all equally it is not meaningful, and here it accelerates unpacking of single files).

At use of algorithms of compression tta, jpg, mm+…, files compressed by these algorithms, are not united in ñîëèä-blocks. It is connected with features of these algorithms, and can sometimes worsen compression, for example when the archive includes some spears(copies) of the same jpg-files.

 

For increase in reliability and support of creation of archives of unlimited volume FreeArc also supports(maintains) breakdown of the directory of archive on the separate blocks which are written down in archive directly after files described by them. By default the directory of archive is broken into the blocks describing on 20 thousand of files. This adjustment(option) can be changed, having written down it(her) in an option-s before “;”. For example, an option-s100; 1m sets splitting the directory of archive into the blocks describing on 100 files, and inside of each of them – a grouping of files for ñîëèä-compression in blocks on 1 Mb. Thus, this adjustment(option) probably to change only simultaneously with adjustment(option) of ñîëèä-compression. If in an option-s does not meet “;”, the size of the block of the directory is established(installed) standard – on  20 000 files. Still more some examples:

-s100;

Blocks of the directory on 100 files. Ñîëèä-blocks on all files in each block of the directory

-s;

One directory and one ñîëèä-block on all archive

-s; 100

One directory on all archive, ñîëèä-blocks on 100 files

-s

Directorys on  20 000 files, ñîëèä-blocks on all files inside of each block of the directory (the above-stated description of the same option “ To merge all files in one block ” slightly it is inexact J)

Thus, the option used by default -s1gb is equivalent-s20000; 1gb

 

This option can be set also in the form of emulation of structure of the directory of existing programs:

-s=7z

It is equivalent “-s; ”

-s=cab

Also it is equivalent “-s; ”, but thus disconnects(switches-off) compression of the directory of archive as it does(makes) cabarc

-s=zip

It is equivalent “-s; 1 ”, i.e. each file is compressed irrespective of others, and the block of the directory is created one general(common) on all archive

-s=arj

It is equivalent “-s1; 1 ”, i.e. each file is compressed irrespective of others and there and then after it(him) the block of the directory describing this file enters the name

Sorting of files for ñîëèä-compression

For increase of a degree of packing files at ñîëèä-compression should be sorted so that files with similar contents have appeared is close to each other. For this purpose the option–ds, setting the order of sorting, for example–dsgen serves. The letters set after–ds, are deciphered as:

c

To break already generated group on two parts – files up to 128 kb to sort according to the subsequent criteria set by the user, and files it is more 128 kb – on the size

e

Sorting on expansion

g

Sorting on the groups described in a file arc.groups

i

To group files under first three letters of a name, inside of groups to sort by the remained criteria, files not entered in one of groups, to gather and sort on the size

n

Sorting by name a file inside of the directory

p

Sorting by name the directory

r

Pereuporyadochenie inside already generated group, having beside relatives on the size and a name files. It enables to make more close, for example, consecutive versions of the same files

s

Sorting on the size

t

Sorting on date/time of a file

 

For example,–dsgen means sorting all over again on group from arc.groups (the letter ‘ g ’), then inside of each of these groups – on expansion (the letter ‘ e ’), and inside of expansions on base names of files (the letter ‘ n ’). This order of sorting providing rather decent results, is applied in RAR and last versions 7-zip. In FreeArc it is by default used–dsgerpn, that even more abruptly J: first, files are grouped under directorys and already inside of directorys are sorted on names (letters “pn”); secondly, similar files settle down beside (the letter ‘ r ’).

However alternative orders of sorting, such as–dsgercpn, –dsgepn,–dsgeipn,–dsgenp and–dsges, on occassion can increase compression. If you wish to disconnect(switch-off) in general sorting (that will accelerate packing set of small files, but will worsen compression), use an option–ds without parameter. Sorting by default is automatically switched off at switching-off of ñîëèä-compression (–s–), switching-off of packing (–m0), at use of the fastest algorithm of compression (–m1) or fake-compression (-nodata or - crconly); if you want, that files have been sorted in these modes, set an option–dsgerpn (or what order is necessary to you) obviously.

By default the list of groups undertakes from a file arc.groups which should be in the same directory, as Arc.exe (under Windows) or in the directory/etc (in Unix). The option - groups allows to set other file of groups. The order in which in it(him) masks of files are described, defines(determines) that order in which these files will be placed in archive. The label $default specifies a place for all remained files. The format arc.groups is completely compatible to a format rarfiles.lst, i.e. you can use the general(common) file of groups for both programs. But thus that the automatic choice of algorithm of packing, multimedia-compression and an option–ms worked, in a file of groups it is necessary to add descriptions of types of files (has see undressed Types of files).

Updating of ñîëèä-archives

The majority of archivers gives only limited opportunities on updating ñîëèä-archives. Unlike them, FreeArc it is capable to update any ñîëèä-archives, carrying out unpacking of old data and packing anew in parallel tredakh.

At updating ñîëèä-archives FreeArc inserts new files between old according to used order of sorting. For example, if in archive already there are files arc.hs and decompress.hs the file compress.hs will be inserted between them (at standard sorting). Thus FreeArc pereupakovyvaet only those ñîëèä-blocks in which there are changed, added or removed files. Moreover, it(he) allows blocks "to walk" within the limits of ±50 % from the set sizes so that not perepakovyvat all archive at each change. For example, if the archive is created with 8ìá blocks and in one of them 1 Mb a file this block begins to contain 9 Mb is added, but other blocks will not have perepakovyvat. Similarly, after removal(distance) of a file of 1 Mb in the block remains only 7 Mb. When the size of the block will exceed 12 Mb – it(he) will be broken into two blocks. If the size of the block becomes less than 4 Mb data from this and following block will be redistributed between them. Thus, little changes in archive are brought for few seconds at preservation of all advantages of ñîëèä-compression.

If you want at addition of new files in archive completely to exclude repacking data already existing in it(him) use an option - append. However keep in mind, that at use of a plenty of commands of addition with an interdiction of repacking you can create the archive containing set of small ñîëèä-blocks. On the other hand, you can use an option - recompress for full repacking data in archive according to current adjustments(options) of compression – thus there will be pereupakovany even those ñîëèä-blocks which contents have not changed at all. However in most cases it is better to rely on intelligence of the program and to not use these options. In any case, you can perepakovat contents of archive a command ch, for example:

arc ch archive–m5


Adjustment(Option) of compression

The option–m, setting a method of compression, has set of opportunities. We shall consider(examine) them from simple to complex(difficult). The most simple way to choose a method of compression – options–m1 –m9. The degree of compression increases from–m1 to–m9, simultaneously with it(this), certainly, increases both an operating time, and use of memory. For–m3 there is enough machine(car) about 64 Mb of the RAM, for–m4 – 128 Mb, etc. you can use an option–mx that the program has automatically chosen from them the most powerful mode which will get into your memory. Keep in mind, that thus for unpacking you will need to have as much the RAM.

There is also a "parallel" line of methods of compression – from–m1x up to–m9x. These methods demand exactly as much memory for packing – 64 Mb for–m3x, etc., but differ memory fast and demanding few(not enough,poorly) unpacking. Payment for it is small deterioration of a degree of compression and speed of packing.

At last, methods of compression–m5p ..–m9p are the "strengthened" versions of methods–m5 ..m9, using additional external packers and filters - ppmonstr for texts, precomp for the packed data (zip, pdf, jpg, gif …). Therefore they give an even greater(big) degree of compression, but work more slowly and demand at unpacking presence of all external programs which have been used at packing. You can use an option–max that the program has automatically chosen from them the most powerful mode which will get into your memory.

Besides is a little "marginalnykh" options of compression:–m5q ..–m9q use ppmonstr.exe for compression not only text, but also binary files, that not always increases the degree of compression (in comparison with–m5p ..–m9p), but always slows down packing.–m2r/–m3r/–m4r/–m5r – small « variations on a theme » methods–m2 ..–m5. You can add own methods of compression, change existing, to describe the reduced names (profiles), editing a file arc.ini.

The following table shows characteristics of the basic methods the compression average on the big volume of tested data (tests were spent on a computer with the processor of 1.2 GHz and 512 Mb of memory):

 

Degree of compression

Speed of packing, kb/sec

Speed of unpacking, kb/sec

Memory for packing

Memory for unpacking

-m1

3.123

8.086

20.474

16 mb

16 mb

-m2

4.477

4.199

8.015

32 mb

32 mb

-m3

5.119

1.497

4.213

64 mb

64 mb

-m4

5.553

697

3.983

128 mb

128 mb

-m5

5.700

522

3.674

256 mb

256 mb

-m5p

5.903

359

1.171

256 mb

256 mb

Modes with fast unpacking

-m1x

3.123

8.086

20.474

16 mb

16 mb

-m2x

4.263

4.947

19.044

32 mb

16 mb

-m3x

4.811

1.684

10.762

64 mb

4 mb

-m4x

5.443

621

11.271

128 mb

8 mb

-m5x

5.657

458

11.451

256 mb

16 mb

 

In the following table results of work of other archivers on the same data set are resulted(brought):

 

Degree of compression

Speed of packing, kb/sec

Speed of unpacking, kb/sec

Memory for packing

Memory for unpacking

SBC 0.970-of

-m1-b5

3.947

1.324

2.801

18 mb

18 mb

-m2-b15

4.339

908

2.536

50 mb

50 mb

-m3-b63

4.799

473

1.960

224 mb

224 mb

RAR 3.70 (-md4096-s)

-m1

3.361

3.824

19.737

32 mb

4 mb

-m2

4.312

1.198

22.986

32 mb

4 mb

-m3

4.574

899

22.344

32 mb

4 mb

-m5

4.734

701

3.765

64 mb

32 mb

-m5-mc14:128t

4.794

665

2.994

160 mb

128 mb

7-zip 4.52

-mx1

3.773

2.053

11.710

280 kb

64 kb

-mx3

4.368

1.745

13.268

16 mb

1 mb

-mx5

5.403

506

15.139

256 mb

16 mb

-mx7

5.481

412

15.008

512 mb

32 mb

-mx9-md=32m

5.564

423

14.280

512 mb

32 mb

UHARC 0.6b (-md32768)

-mz

4.562

2.149

1.988

32 mb

32 mb

-m1

5.298

397

3.138

512 mb

32 mb

-m3

5.477

252

3.247

512 mb

32 mb

-mx

5.773

260

303

64 mb

64 mb

Other

Squeez 5.2

5.315

356

3.083

512 mb

128 mb

Durilca’light

5.038

669

677

512 mb

512 mb

Durilca’light–t1

5.415

183

913

512 mb

512 mb

CCM 1.25

5.793

402

512 mb

512 mb

CCMx 1.25

5.856

313

512 mb

512 mb

LPAQ5

6.128

95

512 mb

512 mb

Durilca–t1

6.302

48

512 mb

512 mb

UDA 0.301

6.828

20

256 mb

256 mb

 

As you can see, the majority of archivers limited enough opportunities on regulation of a degree of compression / give speed of work. The following table compares with modes of compression FreeArc c relatives on speed/compression modes of other archivers:

FreeArc

PKZIP

ZIP

RAR

7-zip

UHARC

-m1

-es

-1

 

-m2

-ex

-9

-m1

-mx1

-mz

-m3

 

 

-m5

-mx5

-m1

-m4

 

 

 

-mx9

-m3

-m5

 

 

-mx

Types of files

In each mode of compression (m1 …m9x) used algorithms of compression get out depending on type of a file – one algorithms are applied to text files, for binary – others, for multimedia - the third. The type of a file is defined(determined) on its(his) expansion. With this purpose the format of a file arc.groups, describing the order of sorting of files, has been a little bit expanded and now includes also descriptions of types of files in the form of labels $text, $binary, etc., inserted before files of corresponding(meeting) type:

$text

readme.*

*.txt

*.doc

$binary

*.pdf

$default

$compressed

*.7z

*.arc

*.rar

*.zip

$wav

*.wav

This description means, that files readme. *, *.txt and *.doc are text, 7z/arc/rar/zip – packed, etc. the Label $default, as well as in RAR, describes the "other" files which are not satisfying with any obviously specified masks. In the given example other files get in group $binary. So, in this example all files are broken into 4 groups - $text, $binary, $compressed and $wav.

To achieve the maximal compression of your own data, watch(keep up) that all expansions of the text, sound, graphic and already packed files typical for your data have been included in section $text, $wav, $bmp and $compressed, accordingly. Files with unknown expansions get in section $binary, therefore for binary files inclusion of their expansions in this file not so is critical (but do not forget, that arc.groups describes still and the order of sorting). Do not forget to use an option–ms  if it is necessary for you to disconnect(switch-off) really compression of files from group $compressed.

Multimedia-compression

FreeArc realizes multimedia compression that is reduced to application of special algorithms of compression to the files included in groups $wav and $bmp. It is necessary to include only cleanly sound, unpacked files In first of them (sound wave files); the files containing mixed data (for example *.stm), will well not be compressed by this algorithm, no less than files in which compression of any type is already applied. The second group is intended for unpacked graphic files (bitmap graphics).

In modes of compressionm1 …m9x multimedia-compression joins automatically, at thin adjustment(option) of compression it can be necessary to include it(him) manually (see Decoding of algorithm of compression and Section [Compression methods]).

Manual management of multimedia-compression is realized by an option–mm:

·         –mm– –to disconnect(switch-off) multimedia-compression. Disconnects(switches-off) use of special methods of compression for files of type $bmp and $wav. Similarly sequences of options–m$bmp = –m$wav =

·         –mmfast – to include fast multimedia-compression. Similarly sequences of options–m$bmp=bmpfast –m$wav=wavfast

·         –mm=max – to include dense multimedia-compression. Similarly sequences of options–m$bmp=bmp –m$wav=wav

·         –mm + (or it is simple–mm) – to include multimedia-compression with an automatic choice of used algorithms (the choice between fast and dense Mm-compression is defined(determined) by that, is how much fast the basic algorithm of compression)

·         (by default) – use and type of multimedia-compression is defined(determined) by adjustments(options) of a used method of compression

 

The option–mc allows to disconnect(switch-off) separate algorithms of compression. For example,-mc-rep disconnects(switches-off) preprocessor REP, and–mc-delta delta-filter. Thus mentions of corresponding(meeting) algorithms of compression simply leave from chains of algorithms of compression. If you delete last (basic) algorithm in a chain this group of compression leaves entirely, for example the option–m-ppmd in modes –m3 ..-m9 will lead to removal(distance) of group $text. It is possible to set and removal(distance) of group:-mc-$ text, that is equivalent to an option–m$text =. Besides are supported(maintained) compatible with RAR one-alphabetic reductions:

RAR-style an option

Equivalent

The description

-mca-

-mc-$ wav

To disconnect(switch-off) special compression for audiodata

-mcc-

-mc-$ bmp

To disconnect(switch-off) special compression for schedules

-mcd-

-mc-delta

To disconnect(switch-off) delta-filter (a preprocessor of tabulared structures)

-mce-

-mc-exe

To disconnect(switch-off) preprocessing executed files

-mcl-

-mc-lzp

To disconnect(switch-off) LZP (a preprocessor of repetitions for texts)

-mcr-

-mc-rep

To disconnect(switch-off) expanded up to 1 gb the dictionary

-mct-

-mc-$ text

To disconnect(switch-off) special compression for texts

-mcz-

-mc-dict

To disconnect(switch-off) DICT (dictionary replacement for texts)

Use of memory

If 75 % from the general(common) volume of physical memory are not enough for the chosen algorithm of compression the program automatically reduces the size of the dictionary/í½«¬á/... So that to go in in this volume of memory. This restriction can be removed(taken off) by means of an option–lc–or to establish(install) own, for example–lc128mb. Also it is possible to establish(install) restriction on volume of memory which is required for unpacking created archive, by means of an option–ld. The size of memory can be set and in percentage of the general(common) volume of the RAM, for example–lc25 % (adjustment(option) by default:–lc75 %–ld75 %; instead of % it is possible to use the letter p, for example–lc25p). At unpacking the option–ld also operates volume of used memory, but opportunities of this management are insignificant – it(she) can use only preservation of intermediate data in files on a disk if the algorithm allows it.

The option–md establishes(installs) the size of the block (for block algorithms) or the dictionary (for LZMA).

If the general(common) volume of data packed into one ñîëèä-block is less than size of the block/dictionary the size of the block/dictionary for this ñîëèä-block in appropriate way decreases. Therefore real consumption of memory can appear less displayed. The algorithms of compression really used in each created ñîëèä-block, and to memory it is possible to display their requirements an option–di + $.

The program uses the buffer of anticipatory reading for acceleration of compression of small files. By default the program tries to allocate for it(him) 16 mb or the size of the block of data at use of block algorithms – looking that more. If necessary this size automatically decreases so that together with the memory necessary for algorithm of packing, it(he) did not exceed 50 % from volume of the RAM of a computer – down to use only 1 Mb. You can establish(install) the size of this buffer, for example - cache=100mb or - cache=40 %. The option - cache-establishes(installs) minimally possible(probable) size of a cache (equal 64 kb).

FreeArc tries to use resources of a computer on a maximum. We shall consider(examine), for example, work by different machines(cars) of a method–m5, 384 Mb of memory using totally. By the machine(car) of all about 256 Mb of the RAM the algorithm will be broken on two parts using on 192 Mb, and these parts will be executed consistently, and data between them are transferred(transmitted) through an intermediate file. By the machine(car) about 512 Mb of the RAM both parts of algorithm will be carried out in parallel, and data between them to be transferred(transmitted) through memory. At last, by the machine(car) with 1Ãá the RAM besides it(this) will be allocated 64 Mb for the buffer of anticipatory reading. Thus, results of compression by all machines(cars) will be identical, but the more to memory is accessible, the all will be faster all over J.

The maximal compression

If you wish to achieve the maximal degree of compression without fuss with thin adjustment(option) use one of following options:

·        –max – includes the most powerful compression accessible at your memory size. For unpacking the same volume of memory plus the same versions of external compressors which were accessible at packing is required to you

·        –mx – the most powerful compression accessible at your memory size, but without use of external compressors. For unpacking the same volume of memory is required to you, as well as at packing

·        –m9x – the most powerful asymmetric compression accessible at your memory size. At unpacking it will be used in 8 times of less memory, and it(she) will go much more quickly, than packing. This mode of compression is convenient for creation of distribution kits, etc.

If you need to limit in addition volume of the memory used for packing or unpacking add options–lc/–ld. For example:–mx–lc1gb–ld256mb sets the maximal internal compression limited 1 gb of memory at packing and 256 Mb at unpacking.


Detailed management of compression

Decoding of algorithm of compression

The method of compression set in an option–m, passes(takes place) through a series of substitutions. We shall consider(examine) result of their work on an example of a mode of the compression used by default:–m4. First of all–m4 it will be transformed in –m4b/4t. This record means « to use for text files (group $text) a mode of compression–m4t, and for all other–m4b ». You can set similar modes, for example:

·         the option–m4b means « similarly -m4, but to consider(examine) all files as binary »

·         the option–m4b/3t means « to use for binary files compression-m4b, and for text–m3t », i.e. to compress binary files at a level–m4, and text – at a level–m3

All simple records of methods of compression (-m1 ..-m9x) will be transformed in a similar way, for example–m9x turns in –m9xb/9xt.

 

Then to this record specific methods of compression for separate types of files are added. They look like $type=method. In particular, if the option–ms is used (to not pack already compressed files), record for–m4 will be transformed in–m4b/4t / $ compressed=0, where “0” (i.e.–m0) is a method of compression which will be applied to the files included in group $compressed.

Then to this list methods of compression for multimedia files are added and it(he) already looks(appears) as –m4b/4t / $ compressed=0 / $ wav=wav / $ bmp=bmp. And this all still absolutely lawful record of an option–m which can be set in a command line. It(she) is deciphered as “ to compress files from group $bmp algorithm bmp, groups $wav – algorithm wav, groups $compressed – algorithm 0, groups $text – algorithm 4t, and at last remained - algorithm 4b ”.

 

On a following step occurs(happens) "dorasshifrovka" the first element of record and it(she) turns in –mexe+4b / $ obj=4b / $ text=4t / $ compressed=0 / $ wav=wav / $ bmp=bmp. It is connected with necessity to allocate files with a moved objective code (*.obj, *.lib, etc.) in separate group to which the exe-preprocessing worsening for them a degree of compression is not applied. Record “exe+4b” means « to apply to initial data algorithm exe, then to compress its(his) output(exit) algorithm 4b ». You can connect in a chain any algorithms though really it is meaningful to apply all over again preprocessors (exe, rep, delta, mm, lzp, dict) and to finish a chain the packer (lzma, ppmd, grzip, tor, tta).

 

At last, approaches(suits) it is time to replace the used abbreviations (4b, 4t) with real methods of compression, to be exact even the whole chains of methods. After that transformations record turns in

 –mexe+rep:64mb+delta+lzma:8mb / $ obj=rep:64mb+delta+lzma:8mb / $ text=dict:p+lzp+ppmd:8:96mb / $ wav=tta / $ bmp=mm+grzip

– And here I have still lowered(omitted) half of details. As you can see, the reduced record of a method of compression rescues(saves) whole lives J. rep, lzma which you here see are already real algorithms of compression, instead of abbreviations. Through colons values of their parameters instead of used by default are set.

 

When the thin control over a choice of algorithms of compression is necessary for you, you can always take advantage of specifications in an option–m for that task how to compress separate types of files or from what methods and with what parameters to design algorithm of compression. Use record of type–m4b/3t if you wish to set separately methods of compression for text and binary files. Add records of a kind $type=method if you wish to specify methods of compression for the certain types of files, for example–m4 / $ html=2t or–m4b/3t / $ html=2t. At last, use record of real algorithms of compression (lzma, ppmd, dict, etc.) and chains of methods (dict+lzp+ppmd) instead of abbreviations (4b, 2t) if you need to design non-standard algorithm of compression. The option-di will allow you to track(look after) results of creativity J.

It is necessary to mean, that spetsmetody compression for multimedia files are added in a command line only at use of options–mN or–mNx. If you write down the basic method of compression (i.e. that up to “$”) in more deciphered kind to you will have to add them manually. Thus, the option–m4 in accuracy is equivalent to record–m4b/4t / $ wav=wav / $ bmp=bmp. You also can add to current adjustments(options) of compression additional algorithms for separate types of files, using an option in the form of–m$type=method; for example–m5–m$wav=lzma it is similar–m5 / $ wav=lzma. In particular, the option–ms is equivalent–m$compressed=rep:8mb:128+tor:2:64k.

 

You can deduce(remove) the full list of the substitutions which have been built in the program, a command arc - print-config and to add with their own substitutions, having set them in arc.ini. As a whole this system of substitutions is aimed at enabling you to adjust(set up) as much as possible flexibly ways of compression and at the same time it is convenient to choose the necessary adjustments(options) at everyday use.

Choice of algorithms of compression

Let's return to decoding algorithm of compression by default:

–m exe+rep:64mb+table+lzma:8mb / $obj=rep:64mb+table+lzma:8mb / $text=dict:p+lzp+ppmd:8:96mb / $wav=tta / $bmp=mm+grzip

As you can see, the algorithm of compression for each type of files consists of one or several processes divided(undressed) by signs plus. Thus the first processes in a chain play a role of the preprocessors reducing redundancy of a file, and last process carries out final compression. After the name of each process through colons additional parameters can enter the name, however they are unessential – all adjustments(options) have values by default. The algorithm of compression should be chosen according to type of compressed data and demanded a parity(ratio) speed/compression, in particular (all the speed long are resulted(brought) for the one-nuclear processor with frequency 1ÃÃö):

·        for text files (including here source codes of programs, html/xml/ps files and formats of the files representing in essence the usual text) should be used many other things grzip, ppmd or pmm – depending on a demanded level of speed/compression. grzip:m4 – the fastest algorithm of compression for texts, grzip:m1 is close to ppmd – for some percent(interests) worse compression, but unpacking is twice faster. For increase in compression in ppmd/pmm it is necessary to increase the order of model and simultaneously volume of used memory. Speed of work grzip – some Mb/ßѬ, ppmd – 1-2 Mb/ßѬ, pmm – 100-300 kb/ßѬ. All these algorithms are (almost symmetric, therefore requirements to memory at unpacking and its(her) speed do not differ almost from parameters of packing. Only grzip:m1 unpacks twice more quickly, than compresses. The algorithm pmm  is realized by a call of the external program ppmonstr.exe which presence is necessary both for packing, and for unpacking, and in the same versions

·        for binary files (including, by the way, and texts from a bat-bit codings) it is necessary to use lzma. lzma:fast gives fast compression, sravnimoe with RAR. The further acceleration can be received, using smaller values of parameters fb and mc, for example lzma:fast:fb5:mc1. By default lzma uses strong compression, it(he) can be increased even more by means of increase in the same parameters fb and mc, for example lzma:fb128. One more parameter – the size of the dictionary. For packing it is necessary 10*dictsize byte of memory, for unpacking – dictsize. Speed of unpacking – 10 Mb/with, packings – 200êá-2ìá/ñ depending on the chosen degree of compression, on 2-nuclear processors packing on 70 % is faster. lzma it is possible to use also for text data when it is necessary to provide greater(big) speed of unpacking

·        the algorithm is intended for very fast packing tor (Tornado). Modes from tor:1 up to tor:7 give a range of speeds of compression from 100 Mb/with up to 4 Mb/with

·        for cleanly sound files (wave audio) is better the special codec tta, which speed of 3-10 Mb/with, certainly, will approach(suit)

·        for other multimedia files it is necessary to use a universal set mm+grzip. The preprocessor of multimedia-data mm distinguishes(recognizes) type multimedii (for example, « 2 channels on 16 bats with heading in 44 bajta ») and makes pokanalnoe the subtraction improving the subsequent compression grzip. The preprocessor mm can be applied in a combination and to other algorithms of compression (ppmd, lzma), but compression thus will be little bit worse. However as lzma unpacks data at 5-10 time more quickly, than grzip, the chain mm+lzma well approaches(suits) for realization of dissymetric modes of multimedia-compression

 

Use of preprocessors before the basic algorithm of packing allows still more some percent(interests) of compression. For binary data it is possible to use following preprocessors:

·        exe – will transform an executed code for improvement of compression. At use together with other algorithms should be the first in a chain. On obj/lib files (i.e. files with a moved objective code) worsens compression, therefore FreeArc it is adjusted(is set up) so, that these files are allocated in separate group to which this preprocessor is not applied. Hardly-hardly worsens compression of files without an objective code

·        rep – deletes repetitions on greater(big) distances. Considering, that lzma can use the dictionary only in 1/16 from volume of cash memory, and rep – in 1/2 from this volume, they are favourable for combining together: first rep codes repetitions on long distances, and then lzma carries out the basic compression, for example rep:512mb+lzma:64mb will provide high compression by the machine(car) with 1 gb memories while lzma:512mb on it(her) it could not to be developed(unwrapped), certainly. Requirements rep to memory – 1.25*dictsize. In its(his) chain it is better to put right after exe as it(he) possesses the big speed and reduces volume of data and therefore an operating time of the subsequent algorithms

·        delta – finds and processes the tabulared data meeting in executed files, databases and many other things types of files

 

For text data it is possible to use following preprocessors:

·        dict – finds repeatedly repeating sequences bajtov ("words") and replaces them with 1-2 byte codes

·        lzp – it is similar rep, finds repeating lines, but it is calculated on processing of text data

With grzip both these(it) of a preprocessor usually are not used – lzp because it(he) and so it is built already in in grzip, and dict – because from it(him) in a combination with bwt/st is not enough sense. Use of these preprocessors is especially favorable affects on lzma and pmm as allows not only to improve compression, but also considerably(much) to accelerate their work.

 

You can see practical use of all these recommendations in the table of realization of methods of compression which is unpacked(printed out) by a command arc - print-config.

Parameters of algorithms of compression

The following table describes for each algorithm of compression sense of its(his) parameters set through colons (for example ppmd:o10:mem96m:r1) and their values by default:

Parameter and its(his) value by default

The description

PPMD

o10

The order of model, i.e. quantity(amount) of symbols on which the prediction of a following symbol is carried out. Can be specified also without a prefix: ppmd:4

mem48mb

Volume of the memory used under model. Also it is possible to specify in the form of “m96mb” and even “96mb”, i.e. with a prefix “m” or at all without a prefix. About how memory sizes are set, has see undressed the Task of options Error! Bookmark not defined.

r0

Mode of updating of model (0/1/2.) “r” it is equivalent “r1”

PMM

o16

The order of model, i.e. quantity(amount) of symbols on which the prediction of a following symbol is carried out. Can be specified also without a prefix: pmm:10

mem192mb

Volume of the memory used under model. Also it is possible to specify in the form of “m96mb” and even “96mb”, i.e. with a prefix “m” or at all without a prefix. About how memory sizes are set, has see undressed the Task of options Error! Bookmark not defined.

r1

Mode of updating of model (0/1/2.) “r” it is equivalent “r1”

LZMA

a1

Algorithm of search of conformity: “a0” – fast, “a1” – normal. With a0 it is better to use hc4 match finder (see below), and with a1 – bt4

d8mb

The maximal distance of search of conformity (dictionary). It is set as volume of memory, has see undressed the Task of options  Error! Bookmark not defined.. It is possible to specify This parameter without a prefix: lzma:4m

fb32

The minimal length of the found conformity after which search of more successful ( even longer) conformity stops. Reduction of this parameter is capable to increase considerably speed of packing due to reduction of a degree of compression. It is possible to specify this parameter without a prefix: lzma:16. Increase it(him) up to 128 if you need to achieve the maximal compression

mc0

The maximal length of a chain of search. Adjustment(option) mc0 establishes(installs) it(him) in value by default which depends on parameters a and fb: mc = a == 1? fb/2+16: fb/4+8. Value of this parameter directly influences a parity(ratio) speed of work/degree of compression

lc3

The sense of this parameter is known only to Igor Pavlovu, the author of algorithm LZMA J

lp0

-.-

pb2

-.-

mfBT4

Match finder. After “mf” it is possible to specify one of following types: "bt2", "bt3", "bt4", "hc4". The detailed description of their features can be found in the documentation on 7-zip. It is possible to specify this parameter without a prefix: lzma:hc4

For convenience of use some reductions are entered also:

·         fastest = a0:hc4:fb6:mc1

·         fast = a0:hc4:fb32:mc0

·         normal = a1:bt4:fb32:mc0

·         max = a1:bt4:fb128:mc0

·         ultra = a1:bt4:fb128:mc10000

Thus, for example, the fast lzma can be set compression as lzma:fastest:32k, and the most powerful – as lzma:ultra:256m. Adjustments(options) are by default equivalent lzma:normal:8m

GRZip

m1

Method of compression (from the most dense to the fastest: m1 – BWT+WFC, m2 – BWT+MTF, m3 – ST4+WFC, m4 – ST4+MTF)

b8mb

The size of the block of packed data. It is set as volume of memory, has see undressed the Task of options Error! Bookmark not defined.. It is possible to specify This parameter without a prefix: grzip:4m

l32

Minutes length of the conformity used at LZP-preprocessing. It is possible to specify this parameter also without a prefix: grzip:64

h15

The logarithm kol-âà elements in the õåø-table used at LZP-preprocessing. Reduction of this parameter accelerates packing and unpacking, but reduces a degree of compression, especially by data with greater(big) kol-âîì small repeating lines, as for example texts. For achievement of the maximal compression this parameter can be increased, say, up to 20

s

To use alternative algorithm of sorting in a BWT-mode. Practical value has no

a

To use heuristic algorithm for splitting data into blocks of the smaller size

l

To disconnect(switch-off) use of a LZP-preprocessor. On some data (for example, on texts of books) this preprocessor does not give an appreciable prize in compression, but increases time and packings, and unpackings

d

To include a heuristic preprocessor for multimedia data

p

To disconnect(switch-off) all preprocessors (LZP, multimedia, splitting of data into blocks of the smaller size). It is necessary to notice, that by default all of them, okromya LZP and so are disconnected(switched-off), and LZP with the same success it is disconnected(is switched-off) also by parameter l. So it more likely secure on the future when in algorithm GRZip new preprocessors can be added

LZP

 

It is necessary to notice, that algorithm LZP is a same LZP-preprocessor from GRZip, slightly modified Dimoj SHkarinym for more effective utilization together with ppmd/pmm. Therefore its(his) base parameters do not differ from parameters of a LZP-preprocessor in algorithm GRZip though I have added to them some new opportunities

b8mb

The size of the block of packed data. It is set as volume of memory, has see undressed the Task of options Error! Bookmark not defined.. It is possible to specify This parameter also without a prefix: lzp:4m. Volume of the memory demanded both for packing, and for unpacking – 2*blocksize

l64

Minutes length of conformity. It is possible to specify this parameter also without a prefix: lzp:85. At use LZP as preprocessor to algorithm PPMD the author recommends to use the value calculated under the formula ppmdOrder*10-15

h18

The logarithm kol-âà elements in the õåø-table. Reduction of this parameter accelerates packing and unpacking, but reduces a degree of compression, especially by data with greater(big) kol-âîì small repeating lines, as for example texts. For achievement of the maximal degree of compression this parameter can be increased, say, up to 24, that will demand 4*2^24 = 64 Mb of memory over vysheupomyanutykh 2*blocksize

d

Border after which requirements to length of lines decrease that allows to build the two-level mechanism – we shall tell, up to a distance of 8 Mb we select lines from 64 bytes, after – from 32 bytes: lzp:64:d8m:s32

s32

Requirements to length of lines after crossing a barrier (if this parameter is more:l its(his) value is dumped(reset) up to:l)

100 %

Blocks of data, which degree of compression it has appeared worse specified kol-âà percent(interests), are remembered in not compressed kind

REP

b64mb

The maximal distance of search of conformity (dictionary). It is set as volume of memory, has see undressed the Task of options  Error! Bookmark not defined.. It is possible to specify This parameter without a prefix: rep:512m. Volume of the memory demanded for packing – 1.25*dictsize, for unpacking – dictsize

l512

Minutes length of conformity. It is possible to specify this parameter also without a prefix: rep:32. The best value – 512 as if rep will start "to intercept" lines of the smaller sizes the general(common) level of compression together with the subsequent lzma will decrease

h0

The logarithm kol-âà elements in the õåø-table. Value 0 designates, that the program chooses the size khesha itself – at a rate of 0.25*dictsize. For achievement of the maximal degree of compression this parameter it is possible to increase (especially big influence it renders at the small size of parameter:l, for example,:l32). For example, if to set h24 the size khesha will be 4*2^24 = 64 Mb

a1

Factor of " strengthening(amplification) of search ». Use of values more than 1 allows to find hardly more concurrences due to reduction of speed of compression. This parameter can be used for achievement of the maximal compression: rep:a99

d

Border after which requirements to length of lines decrease that allows to build the two-level mechanism – we shall tell, up to a distance of 8 Mb we select lines from 512 bytes, after – from 32 bytes. It can make sense, if lzma all is equally limited by a distance 8ìá: rep:512:d8m:s32+lzma:8m

s512

Requirements to length of lines after crossing a barrier (if this parameter is more:l its(his) value is dumped(reset) up to:l)

DICT

b64mb

The size of the block of packed data. It is set as volume of memory, has see undressed the Task of options Error! Bookmark not defined.. It is possible to specify This parameter also without a prefix: dict:32m. Volume of the memory demanded for packing – 1.5*blocksize, for unpacking – blocksize

p

To adjust(set up) parameters of algorithm on use together with ppmd/pmm or bwt/st algorithms (by default parameters are adjusted(set up) on use together with lzma). This adjustment(option) toughens criteria of selection of words, as for more powerful algorithms of compression (we shall tell, meeting in the block of only 30-100 times) it is better to not code rare words

100 %

Blocks of data, which degree of compression it has appeared worse specified kol-âà percent(interests), are remembered in not compressed kind. An example: dict:90 %

TTA

 

Except for an opportunity to adjust(regulate) a level of compression, all other parameters of this algorithm completely repeat parameters of algorithm MM

m3

Level of compression. m1 – the fastest (10 Mb/with), m3 – the slowest (3 Mb/with) and the most dense

MM

s

The parameter:s disconnects(switches-off) the analysis of headings of files (where the type of data enters the name) and forces MM to define(determine) quantity(amount) of channels and them bitnost only on the basis of the analysis of a contained file

d9

This parameter allows to set the accelerated analysis of a contained file (it is set as:d1)

c0

Sets quantity(amount) of channels in a coded file. Value greater 0 disconnects(switches-off) auto detection of type of data

w0

Sets width in bats of each channel in a file. Value greater 0 disconnects(switches-off) auto detection of type of data

c*w

To disconnect(switch-off) the analysis of heading/given(data) and to force coding given as containing c channels in width on w bats. An example: mm:2*16, that is equivalent mm:c2:w16

o0

To pass(miss) set êîë-in byte in the beginning of a file (i.e. to copy them as is instead of multimedia-coding). It is applied together with the previous parameters, for example mm:o44:2*16

TOR

5

Level of compression, from 1 up to 12. In practice use of levels above 7-th is not meaningful, as they concede lzma under the characteristics. The table of speeds:

·         tor:1 – 50-100 Mb/with

·         tor:3 – 20-30 Mb/with

·         tor:5 – 5-10 Mb/with

·         tor:7 – 3-5 Mb/with

This parameter automatically adjusts(sets up) all the others so in most cases about them there is nothing to worry

b16mb

The size of a sliding window within the limits of which repetitions of data are searched. It is possible to specify without a prefix, for example tor:4m

h8mb

Volume of the memory used for the õåø-table

l4

Depth of search: great values improve compression, but slow down it(him)

u999

Regularity of updating of statistics inside of the found lines. u1 sets the slowest and dense mode of compression; using parameter u1 or u2, it is possible to improve on pair percent(interests) compression due to its(his) double delay

EXE

 

This algorithm has no adjustments(options)

DELTA

 

This algorithm also has no adjustments(options)

External compressors

Besides it(this), in applied on the program arc.ini are certain additional bezpoternye the algorithms of compression sold by a call of external programs, in particular:

·        pmm: ppmonstr – the powerful packer of text data

·        precomp: a preprocessor for the compressed files, unpacking them

·        ecm: a preprocessor for the iso-images, deleting from them superfluous CRC the information

The applied variant arc.ini will involve these algorithms in modes –max and-m*p for groups of files $text, $precomp / $ jpgsolid and $iso, accordingly, therefore presence ppmonstr.exe in PATH is necessary for these modes of compression, and presence of the others exe-øíèêîâ in PATH will increase a degree of compression even more. At absence of the program in PATH the corresponding(meeting) step in a chain of compression will be simply passed(missed) and at unpacking such archive this program, certainly, it will not be required.

 

Also in mine arc.ini some packers of a general purpose are certain. I shall list them in ascending order to a degree of compression:

·        dul: durilca’light – ppmd, obveshannyj additional evristikami and preprocessors

·        ccm/ccmx: fast context mixing compressor by Christian Martelock

·        lpaq - « very fast paq » by Matt Mahoney and Alexander Ratushnyak

·        dur: durilca – ppmonstr with the maximal adjustments(options), obveshannyj additional evristikami and preprocessors

·        uda: « fast paq » by dwing

·        paq: the most powerful packer at present, though also very slow, initial author Matt Mahoney

You can pack these algorithms for achievement of an even greater degree of compression at preservation of all advantages of reliability and the functionality given FreeArc. Besides them it is possible (and it is necessary) to combine with internal and external preprocessors (such, as dict or precomp) for achievement of the characteristics inaccessible to original programs in the pure state. Do not forget, however, that all the used packers be required and at unpacking!

uda it is required for work of memory of 200 Mb, ccm (x), (l) paq, durilca and durilca’light in mine arc.ini of 276-450 Mb are adjusted(set up) on use – you can change these adjustments(options) under the requirements. ecm and precomp no more than 10 Mb of memory demand.

 

In summary I shall result(bring) references(links) for loading these programs:

·        ppmonstr: http: // www.compression.ru/ds/ (swing ppmd)

·        precomp: http: // schnaader.info

·        ecm: http: // www.neillcorlett.com/downloads/ecm100.zip

·        durilca and durilca’light: http: // www.compression.ru/ds/durilca.rar

·        ccm: http: // www.geocities.com/lovepimple_mail/downloads/ccm125.zip

·        paq, lpaq: http: // cs.fit.edu / ~ mmahoney/compression/

·        uda: http: // wex.cn/dwing/download/uda0301s.7z

Block algorithms

Block algorithms of compression which compress each block of data irrespective of the others refer to. Thus they read out given as the greater(big) block, process them, the compressed data deduce(remove), then read out the following block, etc. From realized now in the program to them concern grzip, mm+grzip, lzp and any chains of algorithms beginning with dict. The size of the block in them – one of parameters of algorithm (for mm+grzip it is the size of the block grzip, for dict+… it is the size of the block dict).


Config-file arc.ini

The archiver can be in addition adjusted(set in addition up) by means of a config-file arc.ini which should be in the same directory, as Arc.exe (under Windows) or in the directory/etc (in Unix). An example of contents a config-file:

 

; Default options for all commands

- logfile=c: \temp \freearc.log - display=hnwfts

 

[Default options]

; Default options for specific commands

a create =-m5-ms

create = - display

 

[Compression methods]

6pt = dict:p + lzp:64mb:32:h22 + pmm:16:400mb

*d = *b / *xt     ; One more comment

*d$bmp = bmp

*d$wav = wavfast

 

First, in it(him) the comments beginning with ‘ are supposed; ’, and the comment can borrow(occupy) a separate line or stand in the end of a line. The first (not empty and not being the comment) a line a config-file can contain options, the general(common) for all commands. All other contents a config-file are broken on section which headings consist in square brackets: [Default options], [Compression methods]. The section [Default options] describes options by default for separate commands. To the left of a sign ‘ = ’ commands to which these options are applied, and on the right – options enter the name. Thus the same command can meet in several lines then all the options set for it(her) are summarized. For example, the above described config-file sets options by default for a command ‘ create ’:-m5–ms - display.

Section [Compression methods]

The section [Compression methods] allows to describe the reduced designations for methods of compression. All the methods of compression built in by the archiver are described in the same way, you can deduce(remove) their descriptions a command arc - print-config and even to insert these descriptions into the config-file. As descriptions of methods from a config-file have a greater priority, than built in in the program, you can adjust(set up) them to the taste and use those parameters which consider it necessary. Inside of archive of the description of methods are stored(kept) in the deciphered kind, therefore it will not create any problems of incompatibility. On the other hand, you can create own methods of compression, reductions which will facilitate their instruction(indication) in a command line are more exact. For example, the above-stated config-file describes a method 6pt which will be used for compression of text files in-m6p. Besides it(he) describes the whole family of methods of compression–m1d. .-m9d, which combine the compression of binary files used in–m *, and the compression of text files used in-m*x.

Language of the description of options of compression demands some explanatories. At use * in the description this line is replaced with the automatic device with 9 lines where * runs values from 1 up to 9, therefore a line

*d = *b / *xt

From the aforesaid a config-file it is equivalent:

1d = 1b / 1xt

...

9d = 9b / 9xt

Each line in this section sets the possible(probable) substitution used at decoding of methods of compression: the left part of this line (up to a sign ‘ = ’) is replaced on right. Thus,-m3d it is replaced on-m3b/3xt, i.e. we program-m3d as the option of compression equivalent–m3b for binary files, and–m3xt for text. Decoding of these methods of compression can be seen on a command arc - print-config:

3b = rep:32m + 3xb

3xt = dict:32m:80 % + 3xb

As you can see, both records refer to decoding of a method 3xb which can be found here:

3xb = lzma:4m:fast:mc8

Thus,-m3d will use rep:32m + lzma:4m:fast:mc8 for compression of binary files, and dict:32m:80 % + lzma:4m:fast:mc8 for text. Is not that so, elementary? J It is necessary to add only, that for files which can appear executed, the preprocessor exe will be added. Full decoding of a method of compression can be seen, having set at archiving an option-di.

 

For compression of multimedia files by corresponding(meeting) algorithms lines are used:

*d$bmp = bmp

*d$wav = wavfast

Alternative way to program all it would be the unique line:

*d = *b / *xt / $bmp = bmp / $wav = wavfast

As you can see, it is very similar to variants of the task of an option–m in a command line. Blanks can be used freely – before use all of them leave.

 

At the task, for example, options–m3d in a config-file will be found in a command line the lines beginning with–m3d $, and their contents are added to decoding a method of compression. Thus,–m3d it will be deciphered as–m3b/3xt / $ bmp=bmp / $ wav=wavfast. In precisely the same way multimedia-compression is added for usual methods –mN/–mNx, only corresponding(meeting) substitutions are included directly in the program. You can unpack(print out) them a command arc - print-config. Pay attention, that algorithms of compression of multimedia files vary depending on a mode of compression is is made for achievement of demanded parameters of productivity.

Lines in arc.ini have the greater priority, rather than built in in the program, and in each of these groups in turn lines without ‘ * ’ have a greater priority, rather than lines with ‘ * ’.

Section [External compressor]

These(It) of section allow to describe algorithms of compression and the preprocessing, using external programs, such as PAQ and CCM. Examples such sektsy:

[External compressor:precomp]

mem = 2

packcmd  = precomp -o $$ arcpackedfile $$.tmp   $$ arcdatafile $$.tmp

unpackcmd = precomp -o $$ arcdatafile $$.tmp  -r $$ arcpackedfile $$.tmp

 

[External compressor:jpg]

mem = 10

packcmd  = packjpg $$ arcdatafile $$.jpg

unpackcmd = packjpg $$ arcdatafile $$.pjg

datafile  = $$ arcdatafile $$.jpg

packedfile = $$ arcdatafile $$.pjg

 

In heading of section after ‘: ’ it is set urged on new algorithm. packcmd and unpackcmd describe commands of packing and unpacking, accordingly. packedfile and datafile – names of the packed and unpacked files with which both commands work; by default it $$ arcpackedfile $$.tmp and $$ arcdatafile $$.tmp. cmem and dmem describe the volume of memory used at packing and unpacking (if they are identical it is possible to set both of the size by means of mem).

 

It is possible to describe at once some versions/variations of one program if they have an identical format of a call:

[External compressor:ccm123, ccmx123, ccm125, ccmx125]

mem = 276

packcmd  = {compressor} c 4 $$ arcdatafile $$.tmp $$ arcpackedfile $$.tmp

unpackcmd = {compressor} d $$ arcpackedfile $$.tmp $$ arcdatafile $$.tmp

 

Thus lines {compressor} in the description are replaced with the name of a method of compression, t.e this description is equivalent to the following:

[External compressor:ccm123]

mem = 276

packcmd  = ccm123 c 4 $$ arcdatafile $$.tmp $$ arcpackedfile $$.tmp

unpackcmd = ccm123 d $$ arcpackedfile $$.tmp $$ arcdatafile $$.tmp

 

[External compressor:ccmx123]

mem = 276

packcmd  = ccmx123 c 4 $$ arcdatafile $$.tmp $$ arcpackedfile $$.tmp

unpackcmd = ccmx123 d $$ arcpackedfile $$.tmp $$ arcdatafile $$.tmp

 

At use of compressors, at which the format of the packed data varies from the version to the version (as at CCM), it is recommended to rename exe-øíèêè under number of the version (ccm123.exe, ccmx125.exe …) and to describe them in arc.ini in the above-stated way. Then add in section [Compression methods] alias on last version of the program:

[Compression methods]

ccm=ccm125

ccmx=ccmx125

 

Example of use of the above described algorithms for definition of a new method of compression in arc.ini:

[Compression methods]

super = precomp+ccm / $jpg=jpg

Now use an option–m=super and vualya!

 

In a file arc.ini from the complete set of delivery of the program you can find other examples of the description of external compressors and their uses for improvement of compression in modes-m*p/-max.


The information for developers

Compilation from source codes

Source codes of the program can be loaded with http: // www.haskell.org/bz/arc.htm. They include a file readme.txt, describing process of installation of compiler GHC and compilation of the program under Windows and Unix.

Addition in the program of new algorithms of compression

For the beginning, create in the directory where there are source codes FreeArc, subdirectory with the name “ C _ <method> ” where method is a name of realized algorithm. Place in this directory all the files necessary for realization of your algorithm. Take for a basis for the makefile, C _ <method> .h, C _ <method> .cpp similar files from directory C_GRZip. Replace in all of them mentions grzip with the name of your method of compression. Then edit the description of class C _ <method> that it(he) included all parameters of your method of compression and only them, and change realization of this class that it(she) corresponded(met) to its(his) description. Do not forget about parse _ <method>.

 

All algorithms of compression and the preprocessing, used in the program, should be led to the standard interface: the function of packing receiving parameters of algorithm, necessary for packing, and the reference(link) on callbacks for reading and data recording; and the function of unpacking receiving parameters of algorithm, necessary for unpacking, and the reference(link) on same callbacks. For example:

 

typedef int INOUT_FUNC (void *buf, int size);  // It Is declared(announced) in Compression.h

int superzip_compress (int dictionary, int level, INOUT_FUNC *read_f, INOUT_FUNC *write_f);

int superzip_decompress (int dictionary, INOUT_FUNC *read_f, INOUT_FUNC *write_f);

 

Further, the algorithm of packing/unpacking carries out the work, causing function read_f for reception of entrance data:

insize = read_f (buf, bufsize);

The address of the buffer where it is necessary to read through entrance data, and its(his) size in bajtakh is transferred(transmitted) this function. It(she) returns:

·         a negative number – an error code

·         a zero – an attribute of end of entrance data

·         positive number – quantity(amount) of the read through bytes

 

Function write_f is caused for record of target data:

result = write_f (buf, bufsize);

The address of the buffer where there are target data and quantity(amount) of written down bytes is transferred(transmitted) this function. It(she) returns:

·         a negative number – an error code

·         a zero or positive number – an attribute of success

 

At reception of negative result from any of these functions it is desirable to stop there and then process of packing/unpacking and to return the received number as result of work of all procedure compress/decompress. After reception of the zero answer from function read_f it is forbidden to cause it(her) again – differently results can be unpredictable. All buffers are allocated with your procedures, after returning from procedure write_f contents of the buffer are written already down also it(him) it is possible to copy new data. At returning from process of packing/unpacking it is necessary to release(exempt) all the allocated blocks of memory. It is necessary to include (by means of *include) in the code a file "../Compression.h" – in it(him) are all necessary for communication(connection) with FreeArc definitions. It is desirable to read and write down given by blocks on BUFFER_SIZE byte (this constant also is in Compression.h).

 

After you have defined(determined) functions of packing and unpacking on Ñ/C ++ (to do: to give a code for testing algorithms of packing/unpacking directly on), it is possible to start their connection to FreeArc. Add to Compression/compile.cmd a call make for yours makefile, and include in compile.btm an objective file of your method of compression near to c_grzip.o.