adxenc: use bytestream functions for header writing.