bytewrite, bitwrite: fix buffer transmission