Changed byte buf to use custom offset instead built-in ByteBuffer one