Implemented two encoding modes: Constant/Variable