                                                              User's Manual

                                                               BIX Archiver

                                                        Version 1.00 Beta 7




Contents
--------

  Contents
  Introduction
  Command line syntax
  Commands
  Switches
  FAR support
  Final comments


Introduction
------------

BIX Archiver is a freeware program for manipulating with file archives. BIX
is a console 32-bit executable for Windows 95, 98 and NT.


Command line syntax:
--------------------

          BIX <command> [<switch>...] <base_archive_name>[.bix]
          [<arguments>...]

          <arguments> ::= <switch> | <wildcard> | <filename> | <list_file>

          <switch>::= {'/'|'-'}<switch_characters>[<option>]

          <list_file> ::= '@'<filename>

Expressions in square brackets (between '[' and ']') are optional.

Expressions in curly braces (between '{' and '}') are required.

Expression

          expression1 | expression2 | ... | expressionN

means that any (but only one) from these expressions must be specified.

Commands and switches can be entered in upper or lower case.

Command is the first non-switch argument.

The "base_archive_name" must be the first filename on the command line
after the command.

The switches and other filenames can be in any order.

Wildcards or filenames with spaces must be quoted:

          "Dir\Program files\*"

          Dir\"Program files"\*

Switch options can be combined to save command line length. However, some
switch options take optional string arguments and therefore, must be the
last option in a combined argument token string because BIX accepts the
rest of the argument token as the optional argument.

BIX uses wild name matching similar to Windows 95:

   * '*' means a sequence of arbitrary characters.
   * '?' means any character.

Examples:

 "*.txt"      means all files with an extension of
              ".txt"

 "?a*"        means all files with a second
              character of "a"

 "*1*"        means all names that contains
              character "1"

 "*.*.*"      means all names that contain two "."
              characters

The default wildcard "*" will be used if there is no filename/wildcard in
command line.

Restrictions for wildcards and filenames for archiving files:

   * Wildcards and filenames can't contain disk name or network name. Every
     wildcard/filename path is treated as path from current directory on
     disk and as path from root directory in archive. In other words, the
     first part of path (letters before first slash ('\') symbol) always
     must be name or wildcard.
   * Wildcards and filenames can't be ended by slash ('\') symbol
   * Wildcards can contain wildcard characters ('*' and '?') only in last
     part of path.

Examples:

 Dir1\*.cpp             OK

 c:\Dir1\*.cpp          ILLEGAL: path contains disk name

 Dir1\Dir2\g?.txt       OK

 Dir1\D?r2\file1.txt    ILLEGAL: there is a wildcard char in
                        non last part

These restrictions do not act to filenames and directory names used not as
archiving files.


List file
---------

You can supply one or more filenames or wildcards for special list files
(files containing lists of files). The filenames in such list file must be
separated by space, tab or new line symbol(s). Wildcards or filenames with
spaces must be quoted.

Multiple list files are supported.

For example, if contents of file "listfile.txt" is the following:

          "My programs\*.cpp"

          Src\*.cpp

then command

          BIX a archive @listfile.txt

adds to archive "archive.bix" all "*.cpp" files from directories "My
programs" and "Src"


Commands:
---------

  ID   Description   Related Switches

   a   Add           -i, -m, -md, -r, -s, -u,
                     -w, -x

   d   Delete        -i, -m, -md, -r, -s, -u,
                     -w, -x

   e   Extarct       -i, -o, -r, -x, -y

   l   List          -i, -r, -x

   t   Test          -i, -r, -x

   u   Update        -i, -m, -md, -r, -s, -u,
                     -w, -x

   x   Extract       -i, -o, -r, -x, -y
       with full
       paths


a: Add files to archive
-----------------------

This command allows to add files to archive.

Examples:

          BIX a archive subdir\*

archives all files in directory "subdir".

          BIX a archive "Program files\*" -r

archives all files in directory "Program files" and subdirectories.

See also: d, u, -u

Related switches: -i, -m, -md, -r, -s, -u, -w, -x


d: Delete files from archive
----------------------------

This command allows you to delete files from the archive. These deleted
files are physically removed from the archive.

Example:

          BIX d archive *.bak

See also: a, u, -u

Related switches: -i, -m, -md, -r, -s, -u, -w, -x


e: Extract files from archive
-----------------------------

This command will extract one or more files from the archive to the current
directory or to the output directory if specified. BIX will prompt the user
before overwriting existing files unless the user specifies the "-y"
switch. If the user gives a "no" answer, BIX will prompt must file be
extracted to other filename. Then a "no" answer skips file and "yes"
prompts for new filename.

BIX accepts the following responses:

   * "Yes"
   * "No"
   * "Always" sets BIX to assume YES for ALL subsequent queries of the same
     class
   * "Skip" sets BIX to assume NO for ALL subsequent queries of the same
     class
   * "Quit"

Abbreviated responses such as "y", "n", "a", "s" and "q" are allowed.

Example:

          BIX e archive -oc:\soft *.cpp

extracts all files ending in ".cpp" to subdirectory "c:\soft".

See also: x

Related switches: -i, -o, -r, -x, -y


l: List contents of archive
---------------------------

Format:

          l [a | t] [f]

List contents of archive.

 a   List with Additional fields

 t   List with all fields,
     including technical

 f   List with pathnames

Example:

          BIX lf archive *.txt

lists all "txt" files with full pathnames.

Related switches: -i, -r, -x


t: Test integrity of archive
----------------------------

Test archive files. This command performs a dummy file extraction, writing
nothing to the output stream, in order to validate the specified file(s).
BIX uses a 32 bit CRC to validate the contents of the files.

Example:

          BIX t archive *.doc

tests all files ending in ".doc".

Related switches: -i, -r, -x


u: Update files to archive
--------------------------

Update older files in the archive and add files that are new to the
archive.

Example:

          BIX u archive *.doc

See also: a, d, -u

Related switches: -i, -m, -md, -r, -s, -u, -w, -x


x: eXtract files with full pathname
-----------------------------------

This command extracts one or more files from the archive to their full
paths in the current directory or to the output directory if specified.

Example:

          BIX x archive -oc:\soft -r *.cpp

extracts all files ending in ".cpp" from all archive subdirectories to
directory "c:\soft".

See also: e

Related switches: -i, -o, -r, -x, -y



Switches:
---------

  ID   Description               Related
                                 commands

  -i   Include filenames         a, d, e, l, t,
                                 u, x

  -m   Set Method                a, d, u

 -md   Set compression           a, d, u
       Dictionary size

  -o   Set Output directory      e, x

  -r   Recurse subdirectories    a, d, e, l, t,
                                 u, x

  -s   Create Solid archive      a, d, u

  -u   Update options            a, d, u

  -w   Assign Work directory     a, d, u

  -x   Exclude filenames         a, d, e, l, t,
                                 u, x

  -y   Assume Yes on all         e, x
       queries



-i: Include filenames
---------------------

Format:

          -i [r [- | 0] ] {@ listfile | ! wildcard}

This switch specifies additional include filenames and wildcards.

 r [- | 0]        Specifies how wildcards and file
                  names specified in this switch must
                  be used. If this option is not
                  assigned then global value, assigned
                  by -r switch will be used. For more
                  details see specification of -r
                  switch

 @listfile        Specifies name of list file. See List
                  file description

 !wildcard        Specifies wildcard or filename

Multiple include switches are supported.

Example:

          BIX a src *.txt -ir!DIR1\*.cpp

adds all "*.txt" files from current directory and all "*.cpp" files from
directory "DIR1" and from all it's subdirectories.

See also: -r, -x

Related commands: a, d, e, l, t, u, x


-m: set compression Method
--------------------------

Format:

          -m <method_id>

          <method_id> ::= 0 | 1

This switch specifies archiving method.

 -m0    "Store" method. Files will be copied to archive
        without compression. Archiving with "-m0" is
        faster then with "-m1"

 -m1    "Normal" method. Files will be compressed. This
        option is set by default

 -m9    "x86" method. Special method for compressiong x86
        32-Bit Executable Files

Note: BIX can create solid archive only with "-m1" ("Normal") method.

Examples:

          BIX a archive *.jpg -m0

adds all "*.jpg" files to archive without compression.

          BIX a arch *.exe *.dll -m9

adds all "*.exe" and "*.dll" files to archive using "x86" method.

See also: -md, -s

Related commands: a, d, u


-md: set compression Dictionary size
------------------------------------

Format:

          -md <size_id>

          <size_id> ::= <kb_size> | <letter_size>

          <kb_size> ::= 64 | 128 | 256 | 512 | 1024

          <letter_size> ::= a | b | c | d | e

This switch specifies size of the sliding dictionary. The sliding
dictionary is a special memory area used by the compression algorithm. If
the size of the file being compressed (or the total size of all files in
the case of a solid archive) is greater than the dictionary size, then
increasing the dictionary size will generally increase compression ratio,
decrease packing speed and increase memory requirements.

   switch     switch    Dictionary
                           size

    -md64      -mda        64 KB

   -md128      -mdb       128 KB

   -md256      -mdc       256 KB

   -md512      -mdd       512 KB

   -md1024     -mde       1024 KB

   -md2048     -mdf       2048 KB

   -md4096     -mdg       4096 KB

Default sliding dictionary size is 1024 KB. Speed of extraction doesn't
depend upon dictionary size.

Note: this switch doesn't affect to archiving with "-m0" method

Example:

          BIX a -s -mdf src *.cpp

adds to archive "src" all "*.cpp" files with solid method and 2048 KB
dictionary.

See also: -m, -s

Related commands: a, d, u


o: set Output directory
-----------------------

Format:

          -o dir_path

This switch specifies destination directory where files are to be
extracted.

 dir_path     Specifies the destination
              directory path. It's not required
              path end with a backslash.

This switch works only with extraction commands.

Example:

          BIX e archive dir1\a.doc -oc:\Docs

extracts file "dir1\a.doc" from archive to "c:\Docs\a.doc"

Related commands: e, x


r: Recurse subdirectories
-------------------------

Format:

          -r [- | 0]

This switch specifies method of treating wildcards and filenames assigned
in command line.

 -r         Enable recurse subdirectories. This
            option is default for all commands
            that matches files only within
            archive: e, l, t, x

 -r-        Disable recurse subdirectories.
            This option is default for all
            commands that can scan files on
            disk: a, d, u

 -r0        Enable recurse subdirectories only
            for wildcard names.

Examples:

          BIX l archive -r- *.doc

lists all "*.doc" files in archive that belong root archive directory.

          BIX a archive -r src\*.cpp src\*.h

adds all "*.cpp" and "*.h" files from directory "src" and all it's
subdirectories.

See also: -i, -x

Related commands: a, d, e, l, t, u, x


-s: create Solid archive
------------------------

Format:

          -s [-] [e] [<num_files > f] [<num_kb> k] [@ order_list_file [@] ]

This switch specifies special solid method of archiving.

 -                          Disable solid method.

 e                          Reset solid statistics if file
                            extension is changed

 <num_files> f              Reset solid statistics after
                            compressing <num_files> files

 <num_kb> k                 Reset solid statistics after
                            compressing <num_kb> kilobytes

 @ order_list_file [@]      Specifies order list file
                            path. This path must not
                            contain character '@', because
                            this character is used for
                            determination of the end of
                            "order_list_file" path. If
                            "order_list_file" path is the
                            last option in long switch (it
                            can be -s or -u) then it isn't
                            required that path was closed
                            by '@' character.

Solid is a special archive type. Solid archive is archive packed using a
special compression method, which sees all files as one continuous data
stream. Particularly it is advantageous when packing a large number of
small files.

Usually compressing to solid archive improves compression ratio.

Resetting statistics usually aggravates compression ratio but gives the
following advantages:

   * Decreases losses in case of future archive's damaging.
   * Usually decreases extracting time of the group of files (it can be one
     file), if this group doesn't contain all files of archive.

By default BIX uses file "bixsort.txt" as order_list_file.

Format of BIX order list file for solid archiving:

          This file may contain file names, wildcards and a special entry -
          <default>. The default entry defines the position in the order
          list for files not matched with other entries in this file. Text
          between "<!" and "!>" is considered as comments and not
          processed. Place this file in the same directory as bix.exe.

          Tips to provide improved compression and speed of operation:

        o Files containing similar information should be grouped together
          in the archive if possible.
        o Frequently accessed files should be placed at the beginning.

This switch can be used as part of Update option switch -u.

Note: BIX can create solid archive only with "-m1" ("Normal") method.

See also: -u, -m

Related commands: a, d, u


-u: Update options
------------------

Format:

          -u [-] [s [solid_options] ] <actions> [! new_archive_name]

          <action_set> ::= <state_action>...

          <state_action> ::= <state_type> <action_type>

          <state_type> ::= p | q | r | x | y | z

          <action_type> ::= 0 | 1 | 2

This switch specifies how update files in archive and (or) create new
archives.

 -                    Disable any updates in base
                      archive.

 s [solid_options]    Specifies solid options for
                      archive referred by this
                      command. See -s description.

 ! new_archive_name   Specifies path of the new
                      archive, which must be created.
                      All other options in this
                      switch will refer to this new
                      archive.

                      If not assigned, then all other
                      options in this switch will
                      refer to base archive of
                      command

Term "base archive" means archive assigned by "base_archive_name" string in
command line. See Command line syntax

Description of <state_type>:

For each unique filename there are 6 variants of state:

  <state_type>    State condition     Disk      Archive

       p        File exists in                  Exists,
                archive, but                   but isn't
                isn't wildcarded              wildcarded
                by archive
                command.

       q        File exists in         Not      Exists
                archive but          exists
                doesn't exist on
                disk.

       r        File doesn't         Exists   Not exists
                exist in archive
                but exists on
                disk.

       x        File in archive       Older      Newer
                is newer than
                file with same
                name on disk.

       y        File in archive       Newer      Older
                is older than
                file with same
                name on disk.

       z        File in archive       Same       Same
                is same as file
                with same name on
                disk.



Description of <action_type>:

For each of the <state_type> you can specify action what do you wish:

  <action_type>   Description

        0         Ignore file (don't create item in new
                  archive for this file)

        1         Copy file (copy from old archive to
                  new)

        2         Compress (compress file from disk to
                  new archive)



Any update command (a, d, u) can be assigned in these terms:

               p          q       r       x       y      z

   Disk       any        Not   Exists   Older   Newer   Same
                       exists

            Exists,
 Archive      not      Exists           Newer   Older   Same
           wildcarded



    d         Copy

    a         Copy      Copy     Com     Com     Com    Com

    u         Copy      Copy     Com    Copy     Com    Copy


"Empty" cell means 0 (Ignore).

"Copy" cell means 1 (Copy from base archive).

"Com" cell means 2 (Compress from disk).

If you don't specify "!newArchiveName", then all options will refer to main
archive (archive assigned in command line after command).

If you specify "!newArchiveName", then BIX also will create a new archive
with specified name. BIX can create any number of new archive during one
operation.

By default for each new archive <action_set> is set as action set of main
command (there are 3 different action sets for commands: a, d, u). You can
overload any. <state_action>

Example:

          BIX u exist_archive.bix -u- -usp0q0x2z0!update.bix *.cpp

creates new archive "update.bix" and writes to this archive all "*.cpp"
files from current directory that differs from files in archive
"exist_archive.bix". Archive "exist_archive" will not be changed.

Note: In this versions there are two restrictions:

   * Copy operation from solid archive is not supported.
   * Copy operation from existing archive to solid archive is not
     supported.

See also: -s

Related commands: a, d, u


w: assign Work directory
------------------------

Format:

          -w [<path>]

This switch specifies working directory for temporary base archive. By
default, BIX builds a new base archive file in the same directory as the
old base archive file. By specifying the "-w" switch, you can specify the
working directory where the temporary base archive file will be built.
After the temporary base archive file is built, it is copied over the
original archive and deleted. If <path> is not assigned, then BIX will use
Windows temporary directory.

Example:

          BIX a archive *.cpp -wc:\temp

Related commands: a, d, u


x: Exclude filenames
--------------------

Format:

          -x [r [- | 0] ] {@ listfile | ! wildcard}

This switch specifies what filenames or (and) wildcards must be excluded
from operation.

For full option description of this switch see -i Include switch
description.

-i[r[-|0]]@listfile|!wildcard

Multiple exclude switches are supported.

Example:

          BIX a src *.txt -x!temp.*

adds all "*.txt", except files with "temp" name, to archive "src.bix".

See also: -i, -r

Related commands: a, d, e, l, t, u, x


y: assume Yes on all queries
----------------------------

Format:

          -y

This switch disables most of the normal user queries during BIX execution.
You can use this switch to suppress overwrite queries in the "e" and "x"
commands.

Example:

          BIX x src -y

extracts all files from archive "src.bix". All overwrite queries will be
suppressed and files on disk with same filenames as in archive will be
overwritten.

Related commands: e, x




FAR support
-----------

The "FAR Manager" is very good file manager. It facilitates a large number
of operations with files, folders and archives under Windows 95 and Windows
NT operating systems. It works in text mode. You can download "FAR Manager"
from site:

http://www.creabel.com/softronic

If you want tune "FAR Manager" for BIX supporting you must

  1. Install "FAR Manager"
  2. Add contents of file "bixtofar.ini" (this file is included to BIX
     distributive packet) to file "Plugins\MultiArc\Formats\custom.ini" in
     FAR directory.



Final comments:
---------------

BIX Archiver is an experimental version of the UFA Archiver.

In future, format of the ".bix" file will be changed and archives made by
current version will be not compatible with archives made by future
versions of BIX or UFA Archiver.

Please, don't trust this version for 100%. It's only the beta version, and
it can have some bugs.

If you will disclose any bugs in program, please, send some report
to the author.

The official page of the BIX can be accessed at:

  http://www.7-zip.com


You may freely send your comments and suggestions to Igor Pavlov, the
author of the BIX:

WWW:
  http://www.7-zip.com

E-mail:
  support@7-zip.com


Igor Pavlov



End of document
