encodeAndWrite

fun encodeAndWrite(    input: ByteArray,     offset: Int,     size: Int): ByteArray?