Kaazing interview question

Encode an integer into bytes using a specific required encoding strategy.