Here is some explanation from the source plus some code that can encode/decode x86 instructions in software