encoding: In writeBlob, if size() is zero, ignore null buf().