Complete example

This is the latest copy of the file "profile.xml" which is part of every Coffeearc release:

<profile name = "Profile Plugin" version="1.0">

    <!-- The description of this profile (when selected, displayed in the console) -->
    <description>This is an example profile. Read 'profile.xml' for more information.
It is part of Coffeearc, (c) 2009 Andreas Besting.
    </description>

    <!-- The 'gui' tag creates various GUI elements (radio-buttons, check-buttons or combo-boxes). 
    Here, three radio buttons are displayed to configure the mode of (multiple) encoders.
    If nothing is selected, all placeholders defined will be replaced by empty strings.
    -->
    <gui name="Mode" type="radio">
        <option label="Fast">

            <!-- Selecting this option will replace the placeholders '%opt1' and '%opt3' in
            all encode parameter strings defined later -->
            <replace key="%opt1" with="-f"/>
            <replace key="%opt3" with="-fast"/>

        </option>

        <!-- The attribute 'default="yes"' will preselect this option -->
        <option label="Normal" default="yes">        
            <replace key="%opt1" with="-n"/>
            <replace key="%opt3" with="-normal"/>
        </option>

        <option label="Strong">
            <replace key="%opt1" with="-s"/>
            <replace key="%opt3" with="-strong"/>
        </option>
    </gui>

    <!-- Example check boxes (one preselected) -->
    <gui name="Misc" type="check">
        <option label="Debug">
            <replace key="%opt2" with="-d"/>
        </option>
        <option label="Information" selected="yes">    <!-- The attribute 'selected' is equivalent to 'default'-->
            <replace key="%opt5" with="-i"/>
        </option>
    </gui>

    <!-- Example combo boxes (2nd option preselected) -->
    <gui name="Many" type="combo">
        <option label="Another option 1"><replace key="%opt4" with="-a:1"/></option>
        <option label="Another option 2" default="yes"><replace key="%opt4" with="-b:2"/></option>
        <option label="Another option 3"><replace key="%opt4" with="-c:3"/></option>
        <option label="Another option 4"><replace key="%opt4" with="-d:4"/></option>
        <option label="Another option 5"><replace key="%opt4" with="-e:5"/></option>
        <option label="Another option 6"><replace key="%opt4" with="-f:6"/></option>
    </gui>
    -->

    <!-- Files with these extensions are added uncompressed to the archive -->
    <skip>zip,rar,tar.gz,7z</skip>

    <!-- Create and store Adler32 checksums for all files before compression -->
    <checksum/>

    <!-- Enable (optional) multi-threading. You should NOT set this flag for ultra-fast compression tools. 
    In other cases, compression    speed can be greatly improved by launching more than one subroutine at once. 
    Declaring the 'maxlevel' attribute allows you to control the maximum number of threads selectable by the user:
    "1"/"Background sorting" : Coffeearc sorts files while compressing in a single thread
    "2"/"2 compression threads" : Coffeearc tries to use 2 compression threads (and continues sorting while compressing). This may work
    well on a dual-core system.
    ... etc.
    Leaving out 'maxlevel' will set no limit (currently, a maximum of 8 threads is possible).
    -->
    <multithreading maxlevel="2"/>

    <!-- The solid-tag defines file clusters for (optional) semi-solid archiving. 
    You should always set at least the <solid/> tag!
    Here, a 50 MiB maximum global size limit is used on all clusters. This will speed up partial extraction of the archive.
    Further, the 10 MiB minimum size limit means that Coffeearc tries to aggregate arbitrary small clusters to bigger ones
    to optimize speed and multithreading performance.
    Leaving out the 'size' attribute (or increasing its value) will set no maximum bound and a minimum bound of 1 MiB.
    -->
    <solid min="10" max="50">    <!-- Note: the attribute 'max' is equivalent to 'size' -->
        <!-- All file clusters are created automatically by sorting files with equal extensions. 
        You can however, optimize the sorting process by further integrating several extensions into one. 
        This can be done by using the "cluster" tag below. 
        -->

        <cluster id="exec">exe,com,dll,so</cluster>
        <cluster id="text">txt,doc,html</cluster>

    </solid>

    <!-- The first 'encode' entry defines the default encoder. This encoder covers all single files or 
    clusters not handled by additional encoders (see below).
    In this case, the 'exec' and all automatically created clusters are compressed.
    --> 
    <encode file="default.exe" params="-c %in %out %opt1 %opt2 %opt4 %opt5">

        <!-- The placeholders '%in' and '%out' are reserved for input and output filenames -->

        <decode params="-d %in %out"/>    <!-- Parameters to use for decoding -->
    </encode>

    <!-- Additional encoders/decoders for special file types.
    Note: These are applied to all clusters which id is listed in the text content of the 'cover' tag, 
    AND to all files that have a file extension of the corresponding cluster.
    Note: additional encoders can only be defined for command-line tools, not for java based encoders.
    -->

    <encode file="media.exe" params="-enc %in %out %opt3">
        <!-- This is a hypothetical media encoder/decoder used for sound and picture files --> 
        <cover>wave,pics</cover>
        <decode params="-dec %in %out"/>
    </encode>

    <encode file="bwt.exe" params="c %in %out">
        <!-- This is a hypothetical encoder/decoder used for text files (using no options) --> 
        <cover>text</cover>
        <decode params="d %in %out"/>
    </encode>

</profile>

Also available in: HTML TXT