added encoder code
Merge pull request #27 from swarage/master

Added Encoder Class