framer: use copyFrom instead of writeUInt for buffer