Perform encoding based on the chapter 2 of the following paper from Torlak et. al. https://pdfs.semanticscholar.org/0eab/e48331afb53ca63caac48b6abca43908d8e5.pdf related to #96 @harunuyar