'Dealing with multiple special opcodes

So I've been working on making a disassembler for Rockstar's scripting engine, and I'm currently dealing with adding all of the opcodes. To give a bit of background, each opcode is a string of bytes, with the first byte being the identifier to which opcode it is, followed by the data that opcode needs. The main problem I'm running into is that there are over 150 opcodes, all with different lengths and all needing different operations done to the following bytes to extract the correct data from them. So I'm mainly just asking for some other peoples opinions, but what would be the best way to handle all 150+ opcodes uniquely? I know I could use a big switch statement, but it would end up being extremely long, and I was thinking there must be a "cleaner" way to do it, I just can't think of one. If anyone has any ideas it would be much appreciated. Thanks!

c++


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source