Currently, the Java wrapper Encoder passes byte array length for finishing data encoding. This is ideal when the encoder is used with offset 0 and full length is passed but for cases where offset is passed and length is also specified, it leads to encoded data corruption.
Modification:
Instead of passing byte array length to the push method, we will now pass length directly.
Motivation:
Currently, the Java wrapper Encoder passes byte array length for finishing data encoding. This is ideal when the encoder is used with offset 0 and full length is passed but for cases where offset is passed and length is also specified, it leads to encoded data corruption.
Modification: Instead of passing byte array length to the
push
method, we will now passlength
directly.Result: Error-free encoding