BSD Ports

devel/py-bitarray 3.12.2 OpenBSD

efficiently handle arrays of Booleans

System
OpenBSD
Repository
OpenBSD ports
Maintainer
The OpenBSD ports mailing-list <[email protected]>
Last update
Commit
3ed4bb4eb2
Categories
devel, lang/python

Description

Bitarray 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 (endianness can be specified).

Methods for accessing the machine representation are provided, including the ability to import and export buffers. This allows creating bitarrays that are mapped to other objects, including memory-mapped files.

* Sequence methods: slicing (including slice assignment and deletion), operations +, *, +=, *=, the 'in' operator, len() * Bitwise operations: ~, &, |, ^, <<, >> (as well as their in-place versions &=, |=, ^=, <<=, >>=). * Fast methods for encoding and decoding variable bit length prefix codes. * Bitarray objects support the buffer protocol * Packing and unpacking to other binary data formats, e.g. numpy.ndarray. * Pickling and unpickling of bitarray objects. * Immutable frozenbitarray objects which are hashable * Sequential search

Utility functions include conversion to/from hex strings and integers, (de-)serialization, pretty printing, creating Huffman codes, compression of sparse bitarrays, various count functions and more.

In the other systems

SystemPortVersion
OpenBSDdevel/py-bitarray3.12.2
FreeBSDdevel/py-bitarray3.8.2
NetBSDdevel/py-bitarray3.11.0
DragonFlydevel/py-bitarray2.8.1_1
HardenedBSDdevel/py-bitarray3.8.2
GhostBSDdevel/py-bitarray3.8.2

Install

Binary package:

pkg_add py3-bitarray

From the ports tree:

cd /usr/ports/devel/py-bitarray && make install

Dependencies

Build dependencies 5
Run dependencies 1

Commit history 2

DateCommitCreditsLog message
3ed4bb4eb2 sthen update to py3-bitarray-3.12.2
82bd151843 sthen update to py3-bitarray-3.11.0