Commit Graph

8 Commits

Author SHA1 Message Date
Eugene f840742724 fix(bitmap): correct growth at byte boundaries, add explicit bounds checks, and adjust bitwise ops
- grow now accounts for bit index + 1 when computing required byte length to avoid off-by-one at byte boundaries
- contains/remove use explicit bounds checks (idx >= this.bits.length) instead of relying on truthy checks
- and clears tail bytes not covered by the shorter operand
- or/xor expand the result to encompass a longer operand so all bits are preserved
- update behavior to be more predictable and safer; tests pass
2025-12-01 21:58:51 +03:00
Eugene eec57ec719 removed useless interface 2025-12-01 19:26:25 +03:00
Eugene 0d04900ec6 format with prettier 2025-12-01 17:37:12 +03:00
Eugene 5b1e81bea9 add tests 2025-12-01 17:36:26 +03:00
Eugene e5dd13477b add simple iterators 2025-12-01 17:30:15 +03:00
Eugene ea844221b7 Little DX upgrade. Now .range() can return VOID.
It means that user don't need to always return `true` to continue iteration, but user can break the iterations by returning `false`.
2025-04-03 19:18:00 +03:00
Eugene dd78397385 Fixed bug with 0-size bitmap (.grow(x))
Add testcase
Add tests script & config
2025-04-02 09:08:46 +03:00
= 0368f12d60 init commit 2024-07-04 22:34:19 +03:00