Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Utilities

    bitarray 0.7.0

    Download button

    No screenshots available
    Downloads: 657  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ilan Schnell | More programs
    Python License / FREE
    February 16th, 2012, 18:17 GMT [view history]
    ROOT / Utilities

     Read user reviews (0)  Refer to a friend  Subscribe

    bitarray description

    efficient arrays of booleans -- C extension

    bitarray is a Python module that provides an object type which efficiently represents an array of booleans. Bitarrays are sequence types and behave very much like usual lists. Eight bits are represented by one byte in contiguous block of memory. The user can select between two representations; little-endian and big-endian. Most of the functionality is implemented in C. Methods for accessing the machine representation are provided. This can be useful when bit level access to binary files is required, such as portable bitmap image files (.pbm). Also, when dealing with compressed data which uses variable bit length encoding, you may find this module useful.

    Installation:

    bitarray can be installed from source:

    $ tar xzf bitarray-0.3.3.tar.gz
    $ cd bitarray-0.3.3
    $ python setup.py install


    On Unix systems, the latter command may have to be executed with root privileges. If you have setuptools installed, you can easy_install bitarray. Once you have installed the package, you may want to test it:

    $ python -c 'import bitarray; bitarray.test()'
    bitarray is installed in: /usr/local/lib/python2.5/site-packages/bitarray
    bitarray version: 0.3.3
    2.5.2 (r252:60911, Jul 17 2008, 10:38:24)
    [GCC 4.2.1 (SUSE Linux)]
    .........................................................................
    ..........
    ----------------------------------------------------------------------
    Ran 90 tests in 2.420s

    OK


    You can always import the function test, and test().wasSuccessful() will return True when the test went OK.


    Product's homepage

    Here are some key features of "bitarray":

    · On 32bit machines, a bitarray object can contain up to 2^34 elements, that is 16 Gbits (on 64bit machines up to 2^63 elements in theory).
    · All functionality implemented in C.
    · Bitarray objects behave very much like a list object, in particular slicing (including slice assignment and deletion) is supported.
    · The bit endianness can be specified for each bitarray object, see below.
    · Packing and unpacking to other binary data formats, e.g. numpy.ndarray, is possible.
    · Fast methods for encoding and decoding variable bit length prefix codes
    · Sequential search
    · Bitwise operations: &, |, ^, &=, |=, ^=, ~
    · Pickling and unpickling of bitarray objects possible.

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · add iterdecode method (C level), which returns an iterator but is otherwise like the decode method
    · improve memory efficiency and speed of pickling large bitarray objects

      


    TAGS:

    booleans arrays | array of booleans | Python module | Python | booleans | arrays

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM