Pyroaring

Latest version: v0.4.5

Safety actively analyzes 629811 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 5

0.2.2

0.2.1

None

0.2.0

FrozenBitMap

The major addition of this release is the new class `FrozenBitMap`. It is analogous to the `frozenset` of the standard library: a `FrozenBitMap` is an immutable object that can be hashed.
The main usecase is to use them in sets or dictionnaries:
python
from pyroaring import FrozenBitMap
mydict = {FrozenBitMap() : 'an empty bitmap',
FrozenBitMap([1, 3, 5, 7, 9]) : 'some odd numbers',
FrozenBitMap([1, 2, 4, 8, 16]) : 'powers of two'
}


Optimizations

Several performance optimizations have been implemented :
- Getting a small slice from a large bitmap used to be very long. This is now fixed.
- Two methods `run_optimize()` and `shrink_to_fit()` have been added. They call their CRoaring [counterpart](https://github.com/RoaringBitmap/CRoaring/blob/v0.2.42/include/roaring/roaring.h#L291-L303).

Information

The version number and the git hash of both pyroaring and CRoaring are available from the module:
python
import pyroaring
print(pyroaring.__version__)
print(pyroaring.__git_version__)
print(pyroaring.__croaring_version__)
print(pyroaring.__croaring_git_version__)

Page 5 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.