Update main.cpp

added encode and decode - julius style