skip zero bytes reading or wrtiting

Windows debug runtime (and maybe some other standard libraries) does not like it. :)