[#BitsToBytes]
= BitsToBytes
:mrdocs:

Pack a vector of bits into bytes, eight bits per byte, least significant bit first&period;

== Synopsis

Declared in `&lt;merkleblock&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::vector&lt;unsigned char&gt;
BitsToBytes(std::vector&lt;bool&gt; const& bits);
----

== Return Value

The packed bytes&semi; the final byte is zero&hyphen;padded when the bit count is not a multiple of eight&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bits*
| The bit sequence to pack&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
