ant-hill/bitmap

Installs: 5 613

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/ant-hill/bitmap

dev-master 2017-08-30 18:12 UTC

This package is not auto-updated.

Last update: 2025-10-04 19:28:07 UTC


README

Simple library allows add, delete, check bits by offset. In offset could be in range of 0 to PHP_INT_MAX

Simple usage:

    $bitMapOffset = new BitMapOffset(4,/* Chunk size, max size for correct work is (PHP_INT_SIZE*8)-1 */);
    $bitMapArray =  new BitMapArray($bitMapOffset,[] /* BitMap Array */);

    $bitMapArray->add(3); // Add set 3rd bit at 1
    $bitMapArray->has(3); // Check for 3rd bit is set
    $bitMapArray->del(3); // Delete 3rd bit if exists