summaryrefslogtreecommitdiffstats
path: root/node_modules/sparse-bitfield/README.md
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
commit81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch)
tree8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/sparse-bitfield/README.md
parent1870f3fdf43707a15fda0f609a021f516f45eb63 (diff)
downloadwebsite_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip
rm node_modules
Diffstat (limited to 'node_modules/sparse-bitfield/README.md')
-rw-r--r--node_modules/sparse-bitfield/README.md62
1 files changed, 0 insertions, 62 deletions
diff --git a/node_modules/sparse-bitfield/README.md b/node_modules/sparse-bitfield/README.md
deleted file mode 100644
index 7b6b8f9..0000000
--- a/node_modules/sparse-bitfield/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# sparse-bitfield
-
-Bitfield implementation that allocates a series of 1kb buffers to support sparse bitfields
-without allocating a massive buffer. If you want to simple implementation of a flat bitfield
-see the [bitfield](https://github.com/fb55/bitfield) module.
-
-This module is mostly useful if you need a big bitfield where you won't nessecarily set every bit.
-
-```
-npm install sparse-bitfield
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/sparse-bitfield.svg?style=flat)](http://travis-ci.org/mafintosh/sparse-bitfield)
-
-## Usage
-
-``` js
-var bitfield = require('sparse-bitfield')
-var bits = bitfield()
-
-bits.set(0, true) // set first bit
-bits.set(1, true) // set second bit
-bits.set(1000000000000, true) // set the 1.000.000.000.000th bit
-```
-
-Running the above example will allocate two 1kb buffers internally.
-Each 1kb buffer can hold information about 8192 bits so the first one will be used to store information about the first two bits and the second will be used to store the 1.000.000.000.000th bit.
-
-## API
-
-#### `var bits = bitfield([options])`
-
-Create a new bitfield. Options include
-
-``` js
-{
- pageSize: 1024, // how big should the partial buffers be
- buffer: anExistingBitfield,
- trackUpdates: false // track when pages are being updated in the pager
-}
-```
-
-#### `bits.set(index, value)`
-
-Set a bit to true or false.
-
-#### `bits.get(index)`
-
-Get the value of a bit.
-
-#### `bits.pages`
-
-A [memory-pager](https://github.com/mafintosh/memory-pager) instance that is managing the underlying memory.
-If you set `trackUpdates` to true in the constructor you can use `.lastUpdate()` on this instance to get the last updated memory page.
-
-#### `var buffer = bits.toBuffer()`
-
-Get a single buffer representing the entire bitfield.
-
-## License
-
-MIT