Efficient Arrays of Booleans

Edit Package python-bitarray
https://github.com/ilanschnell/bitarray

This module 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 a
contiguous block of memory. The user can select between two
representations; little-endian and big-endian.
All 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.

Refresh
Refresh
Source Files
Filename Size Changed
bitarray-1.5.2.tar.gz 0000071258 69.6 KB
python-bitarray.changes 0000007873 7.69 KB
python-bitarray.spec 0000002459 2.4 KB
Revision 4 (latest revision is 26)
Dominique Leuenberger's avatar Dominique Leuenberger (dimstar_suse) accepted request 830624 from Steve Kowalik's avatar Steve Kowalik (StevenK) (revision 4)
- Update to 1.5.2: 
  * add PyType_Ready usage, issue #66
  * speedup search() for bitarrays with length 1 in sparse bitarrays,
    see issue #67
  * add tests
  * support signed integers in `util.ba2int()` and `util.int2ba()`,
    see issue #85
  * deprecate `.length()` in favor of `len()`
  * Use `Py_ssize_t` for bitarray index.  This means that on 32bit
    systems, the maximun number of elements in a bitarray is 2 GBits.
    We used to have a special 64bit index type for all architectures, but
    this prevented us from using Python's sequence, mapping and number
    methods, and made those method lookups slow.
  * speedup slice operations when step size = 1 (if alignment allows
    copying whole bytes)
  * Require equal endianness for operations: `&`, `|`, `^`, `&=`, `|=`, `^=`.
    This should have always been the case but was overlooked in the past.
  * raise TypeError when tring to create bitarray from boolean
  * This will be last release to still support Python 2.6 (which was retired
    in 2013).  We do NOT plan to stop support for Python 2.7 anytime soon.
Comments 0
openSUSE Build Service is sponsored by