Closed avishayp closed 3 years ago
Couldn't one just use the hexdump library? For example (didn't actually run it):
from hexdump import hexdump
from bitstring import BitStream
hexdump(BitStream(b"hey").tobytes())
Yes, I agree that it's better to keep things separate, especially when it is so easy to just get the bytes out (either with the tobytes()
method or the bytes
property). That works fine for me - to be honest I'd never used hexdump, but it does look useful.
First, thanks for this very useful library!
I believe
hexdump
is a de-facto standard when it comes to printing streams of bytes, and as such should be part ofbitstring
. If that sounds like a good idea, I'd provide the PR.