                    =====================================
                      Package "Bit::Vector" Version 5.0
                    =====================================


            Copyright (c) 1995, 1996, 1997, 1998 by Steffen Beyer.
                             All rights reserved.


Legal issues:
-------------

This package is "Non-Profit-Ware" ("NP-ware").

You may use, copy, modify and redistribute it under the terms of the
"Non-Profit-License" (NPL).

Please refer to the file "NONPROFIT" in this distribution for details!

Note that these terms have changed as of version 5.0 of this package.


Prerequisites:
--------------

Perl version 5.000 or higher, a C compiler capable of the ANSI C standard (!)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Installation:
-------------

Please see the file "INSTALL" in this distribution for instructions on how
to install this package.


Changes over previous versions:
-------------------------------

Please refer to the file "CHANGES" in this distribution for a detailed
version history and instructions on how to upgrade existing applications.


What does it do:
----------------

This module is useful for a large range of different tasks:

  -  For example for implementing sets and performing set operations
     (like union, difference, intersection, complement, check for subset
     relationship etc.),

  -  as a basis for many efficient algorithms (the complexities of the
     methods in this module are usually either O(1) or O(n/b), where
     "b" is the number of bits in a machine word on your system),
     like the "Sieve of Erathostenes" (for calculating prime numbers),

  -  for using shift registers (for instance for cyclic redundancy
     checksums) of arbitrary length,

  -  to calculate "look-ahead", "first" and "follow" character sets
     for parsers and compiler-compilers,

  -  for graph algorithms,

  -  for efficient storage and retrieval of status information,

  -  for performing text generation depending on logical expressions,

  -  for big integer arithmetic,

  -  for manipulations of chunks of bits of arbitrary size,

and more.

A large number of import/export methods allow you to access individual
bits, contiguous ranges of bits, machine words, arbitrary chunks of
bits, lists (arrays) of chunks of bits or machine words and a whole
bit vector at once (for instance for blockread/-write to and from
a file).

You can also import and export the contents of a bit vector in binary,
hexadecimal and decimal representation as well as "newsrc" style
enumerations.

Note that this module is especially designed for efficiency, which is
also the reason why its methods are implemented in C.

To further increase execution speed, the module doesn't use bytes as its
basic storage unit, but rather uses machine words, assuming that a machine
word is the most efficiently handled size of all scalar types on all
machines (that's what the ANSI C standard proposes and assumes anyway).

In order to achieve this, it automatically determines the number of bits
in a machine word on your system and then adjusts its internal configuration
constants accordingly.

The greater the size of this basic storage unit, the better the complexity
(= execution speed) of the methods in this module, but also the greater the
average waste of unused bits in the last word.


Important note:
---------------

Note that the C library at the core of this module ("BitVector.c") can
also be used stand-alone (i.e., without Perl).

To do so, link the output file "BitVector.o" (which is produced when you
build this module or when you just compile "BitVector.c") with your
application.


Example applications:
---------------------

See the module "Set::IntegerRange" for an easy-to-use module for sets
of integers.

See the module "Math::MatrixBool" for an implementation of boolean
matrices.

(Both modules are available from "http://www.engelschall.com/u/sb/download/"
or from any CPAN ftp server.)

A tool relying crucially on this "Bit::Vector" module is "Slice" (see
also "http://www.engelschall.com/sw/slice/"), a tool for generating
different document versions out of a single master file. (This tool
was written by Ralf S. Engelschall).

This tool is itself part of another tool (by the same author), "WML"
(= "Website Meta Language"), which allows you to generate and maintain
large web sites (see also "http://www.engelschall.com/sw/wml/"). Among
many other features, it allows you to define your own HTML tags which
will be expanded either at generation or at run time, depending on your
choice.


Credits:
--------

Please refer to the file "CREDITS" in this distribution for a list of
contributors.


Author's note:
--------------

If you have any questions, suggestions or need any assistance, please
let me know!

Also, if there is anything you would like to do with this module which
the module doesn't provide yet, please let me know! If it fits the module's
overall concept, I'll implement it as soon as possible. Frequently this is
only a matter of a few days.

I hope you will find this module beneficial!

Yours,
--
    Steffen Beyer <sb@sdm.de> http://www.engelschall.com/u/sb/
     "There is enough for the need of everyone in this world,
      but not for the greed of everyone." - Mahatma Gandhi
