How is Bytecode "parsed"?
It is my understand that Bytecode is a binary, intermediate representation of the syntax of a given programming language. Certain programming languages, most notably Java and Python, convert their programs into Bytecode which is then written to a file(with the extensions *.class and *.pyc respectively). How does the Virtual Machines of those languages "parse" their Bytecode?
To create a more specific question, take Python's Bytecode for instance. When the Python Virtual Machine begins reading Bytecode from a *.pyc file, how does the Virtual Machine translate the stream of bytes it is reading, into specific instructions?
When the Virtual Machine reads bytecode from a file, it is my understanding that the bytecode one long stream of bytes. How then, is the Bytecode broken into useful chunks? So when the Virtual Machine begins reading in the Bytecode from a file, it has to read in one big bytestream from the file. How then, is that bytestream broken into useful pieces? How is it transformed into opcode and arguments to the opcode?