# StackCollections v0.2: Fixed-size bit vectors and bit sets

**URL:** <https://discourse.julialang.org/t/stackcollections-v0-2-fixed-size-bit-vectors-and-bit-sets/139798>\
**Category:** Package Announcements\
**Created:** [October 2, 2026, 7:15pm UTC](https://discourse.julialang.org/t/stackcollections-v0-2-fixed-size-bit-vectors-and-bit-sets/139798 "2026-10-02T19:15:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Post date:** [October 2, 2026, 9:42pm UTC](https://discourse.julialang.org/t/stackcollections-v0-2-fixed-size-bit-vectors-and-bit-sets/139798/2 "2026-10-02T21:42:34Z")

</div>

`USet` looks very much like [`SmallBitSet`](https://matthias314.github.io/SmallCollections.jl/stable/smallbitset/#SmallCollections.SmallBitSet) from SmallCollections.jl. `UVec{U}` seems to be somewhat similar to [`PackedVector{U,1,Bool}`](https://matthias314.github.io/SmallCollections.jl/stable/packedvector/#SmallCollections.PackedVector) from the same package. The difference is that the length of a `PackedVector` is stored separately. I think it’s a good idea to store the length in the bit mask, see [this post](https://discourse.julialang.org/t/ann-emulatedbitintegers-jl/137830/17).

(Disclaimer: I’m the author of SmallCollections.jl. StackCollections.jl is older; I was not aware of it.)

---

_[View the full topic](https://discourse.julialang.org/t/stackcollections-v0-2-fixed-size-bit-vectors-and-bit-sets/139798)._
