Skip to content

js-data-structure/bitmap

Repository files navigation

js-bitmap

Installation

yarn add js-bitmap

Usage

import BitMap from 'js-bitmap';

function test() {
  const bitmap = new BitMap();
  for (let i = 0; i < 10000;) {
    bitmap.push(i);
    i += Math.floor(Math.random() * 5 + 10);
  }
  for (let i = 0; i < 10000; i++) {
    if (bitmap.isExist(i)) {
      console.log(i);
    }
  }
}

test();

API

  • push(n: Number)
  • isExist(n: Number)
  • clear()

Poformance

preview

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published