update: better way of 0 byte handling;
other minor fix.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>