The devel/py-bitstring,python3 port
py3-bitstring-3.1.5p0 – construction, analysis and modification of binary data
Bitstrings can be constructed from integers (big and little endian), hex, octal,
binary, strings or files. They can be sliced, joined, reversed, inserted into,
overwritten, etc. with simple functions or slice notation. They can also be
read from, searched and replaced, and navigated in, similar to a file or stream.
The OpenBSD ports mailing-list