All files under this 'examples/' directory are unsupported.

While bitarray itself supports Python 3.6+, some examples may require
higher Python versions.


bloom.py
    Demonstrates the implementation of a "Bloom filter", see:
    http://en.wikipedia.org/wiki/Bloom_filter


distance.py
    Implementation of distance functions and comparison to the
    corresponding functions in the scipy.spatial.distance module.


double.py
    Functionality to analyze double precision floating point numbers
    (IEEE 754 binary64).


dubner.rst
    We show how bitarrays can be used to calculate twin primes
    and "middle numbers" very efficiently, and verify the some
    conjectures in: https://oeis.org/A007534/a007534.pdf


dyn_sieve.py
    Prime numbers, implemented as a dynamically growing sieve of Eratosthenes.
    Similar to prime number sieve in SymPy, but implemented using a bitarray.


extend_json.py
    Demonstrates how to construct a json encoder and decoder (using the
    'json' standard library) which can handle extended Python data structures
    containing bitarrays.


gene.py
    Shows how gene sequences (ATGC) can be very easily and efficiently
    represented by bitarrays.


hamming.py
    Implementation of Hamming codes for error correction with send
    and receive functionality.


huffman/
    Directory containing a library and examples for working with Huffman
    trees and codes.


lexico.py
    Contains two functions, all_perm and next_perm, which are handle
    lexicographical permutations of bitarrays.


lfsr.py
    Linear Feedback Shift Register


mandel.py
    Generates a .ppm image file of size 4000 x 3000 of the Mandelbrot set.
    Despite its size, the output image file has only a size of slightly
    over 1.5 Million bytes (uncompressed) because each pixel is stored in
    one bit.
    Requires: numba


masked.py
    Illustrate masked indexing, i.e. using bitarrays to select indices


mmapped-file.py
    Demonstrates how to memory map a file into a bitarray.


ndarray.py
    Demonstrates how to efficiently convert boolean data from a bitarray
    to a numpy.ndarray of dtype bool.
    Requires: numpy


pbm.py
    Defines a simple class called PBM (Portable Bit Map) which allows:
    - addressing pixels by their coordinates
    - storing and loading .ppm (P4), which is the same as .pbm, files


puff/
    DEFLATE decompression implementation based on Mark Adler's excellent
    https://github.com/madler/zlib/blob/master/contrib/puff/puff.c


sieve.py
    Demonstrates the "Sieve of Eratosthenes" algorithm for finding all prime
    numbers up to a specified integer.


smallints.py
    A class is defined which allows efficiently storing an array of
    integers represented by a specified number of bits (1 through 8).
    For example, an array with 1000 5 bit integers can be created,
    allowing each element in the array to take values form 0 to 31,
    while the size of the object is 625 (5000/8) bytes.
