serialize: base64: improve newline handling speed