# Most efficient way of converting binary data to \`AbstractVector{Bool}\`

**URL:** <https://discourse.julialang.org/t/most-efficient-way-of-converting-binary-data-to-abstractvector-bool/9261>\
**Category:** General Usage\
**Created:** [February 22, 2018, 6:42pm UTC](https://discourse.julialang.org/t/most-efficient-way-of-converting-binary-data-to-abstractvector-bool/9261 "2018-02-22T18:42:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [February 23, 2018, 4:03pm UTC](https://discourse.julialang.org/t/most-efficient-way-of-converting-binary-data-to-abstractvector-bool/9261/4 "2018-02-23T16:03:30Z")

</div>

You’re right — `BitArray` doesn’t have any public or officially supported ways of doing this. If you have a `Vector{Uint64}`, then you can “sneak” the data in behind its back:

```julia
julia> A = rand(UInt64, 20)
       B = BitArray(0)
       B.chunks = A
       B.len = length(A)*64
       B
1280-element BitArray{1}:
 false
  true
  true
 false
     ⋮

```

As always, beware that this may change/break at any point.

---

_[View the full topic](https://discourse.julialang.org/t/most-efficient-way-of-converting-binary-data-to-abstractvector-bool/9261)._
