bitty

Utilities with dealing with 1d and 2d bit arrays.

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install bitty
choosenim install bitty
git clone https://github.com/treeform/bitty/

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
bitty - - - - - - -

Source

Repository https://github.com/treeform/bitty/
Homepage https://github.com/treeform/bitty/
Documentation View Documentation
Registry Source nimble_official

README

Bitty - Tightly packed 1d and 2d bit arrays.

  • atlas use bitty
  • nimble install bitty

Github Actions

API reference

This library has no dependencies other than the Nim standard library.

About

This library gives you 1d and 2d bit arrays and operations to perform on them.

If you have type like seq[bool] in your code, switching to bit arrays should improve your memory usage by 8x. Using tightly packed bit arrays can also improve cache performance if you are doing a lot of sequential read access on a large amount of bits. But tightly packed bit arrays can also be slower if you are doing a lot of random write access. Always measure!