Implemented 'LTV encoding' and tested, unittest is missing.