Added big endian conversion in code generation

function. Not entirely sure if this is correct
or not but I think it is needed because we are doing
bitwise operations(could span byte boundaries) and
because x86 is a little endian architecture.

NOTE: The huffman encoding is done backwards
	(root --> leaf, LSB --> MSB)