woodruffw / mollusc

Pure-Rust libraries for parsing, interpreting, and analyzing LLVM
MIT License
77 stars 6 forks source link

Question: Is is possible to write a Bitstream? #49

Open daltonclaybrook opened 1 year ago

daltonclaybrook commented 1 year ago

Now that I've parsed a bitstream, is it possible to make edits to the bitstream and re-serialize it to bytes?

woodruffw commented 1 year ago

Not at the moment! The current implementation only supports reading bitstreams, not writing them back out.

A naive bitstream writer (once that doesn't attempt to make optimal encoding decisions) would be pretty easy to add, but it's been relatively low on my priorities. That being said, I would be happy to review changes towards that.