OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-kb / skills / libquickbit / api-extract.json

24 lines · json ref:
{
  "repo": "libquickbit",
  "timestamp": "2026-01-16T23:39:57.435Z",
  "entryPoint": "index.js",
  "exports": {
    "packageJson": {}
  },
  "api": {},
  "readme": {
    "content": "# libquickbit\n\nThe fastest bit in the West; a library for working with bit fields, accelerated using SIMD on supported hardware.\n\n## API\n\nSee [`include/quickbit.h`](include/quickbit.h) for the public API.\n\n### Indexing\n\nBit fields may be indexed to enable skipping uninteresting portions in effectively constant time. An index is two 128-ary balanced trees of bits with a set bit in a branch indicating that all bits below are the same, either unset or set depending on the tree. An index has a fixed depth of 3 with leaves of the trees being the bit field itself. A single index can therefore contain 128^3 bits (256 KiB). To index more than 256 KiB, several indices may be used.\n\nAn index is initialised using `quickbit_index_init()` and maintained using `quickbit_index_update()`:\n\n```c\nquickbit_t field = malloc(256 * 1024);\n\nquickbit_index_t index;\nquickbit_index_init(index, field, 256 * 1024);\n\nif (quickbit_set(field, 1000000, true)) {\n  quickbit_index_update(index, field, 1000000);\n}\n```\n\nO",
    "sections": [
      "intro",
      "api",
      "license"
    ],
    "hasApi": true,
    "hasExamples": true,
    "exampleCount": 1,
    "examples": [
      "Once an index has been constructed, the `quickbit_skip_first()` and `quickbit_skip_last()` functions may be used to skip portions of the bit field that are not interesting for a given query.\n\n#### Sparse fields\n\nIn cases where memory is at a premium, an alternate API is available for indexing sparse bit fields. This API conceptually operates on several `(field, offset)` tuples and assumes that any holes encountered consist of zeros. Other than the representation of the bit field, the sparse API produces indexes that are indentical to those produced by the dense API.\n\nBit field chunks must be aligned to 128 bit boundaries, must be passed sorted by their byte offset, and must not overlap:"
    ]
  },
  "patterns": []
}