aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/base64.erl
AgeCommit message (Collapse)Author
2017-11-28stdlib: Do not check base64 input more than neededHans Bolinder
Often the decode functions return a function_clause error, but not always, and the errors have not been consistent between modifications of the base64 module. Now the errors are returned as they happen--no attempt to make them look nice is done. The alternative, to ensure that, for example, {badarg, Culprit} is always returned upon bad input, was deemed pointless.
2017-11-28stdlib: Minor optimization of base64Hans Bolinder
Using /bits instead of /binary is faster when constructing binaries.
2017-11-28stdlib: Use binary_to_list in base64 when it is fasterHans Bolinder
It is sometimes faster to use binary_to_list on input, at least when not considering time for garbage collections. The three functions all return a list, and the temporary list created by binary_to_list should be reclaimed very fast. The implementation from before is thus kept.
2017-11-28stdlib: Optimize base64 functionsHans Bolinder
A few test cases with zeroes are added. They were not handled correctly before. The access of DECODE_MAP is moved into the inlined function b64d, for symmetry. The function b64e is also inlined. The speed-up is small, but measurable. Note: encode(List), decode(List) and mime_decode(List) no longer call list_to_binary. This can break code that calls the functions with I/O-lists as input.
2017-09-25base64:decode(Binary) optimized reimplementationMikael Pettersson
2017-09-24base64:decode(List) put the List parameter first for improved performanceMikael Pettersson
2017-09-12base64:decode(List) optimized reimplementationMikael Pettersson
2017-05-04Update copyright yearRaimo Niskanen
2017-02-27stdlib: Fix mime_decode/1 binary matching performanceJesse Stimpson
Symptom: Throughput of base64:mime_decode/1 significantly lower than base64:decode/1. Problem: tail_contains_more/2 prevents compiler from delaying creation of sub binaries. Solution: Restructure mime_decode_binary/2 to use binary matching best practices from the Efficiency Guide. See ERL-366
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2013-01-25Make adjustments for UnicodeHans Bolinder
2013-01-21[hipe, kernel, stdlib] Correct a few typesHans Bolinder
The type ascii_string() in the base64 module has been corrected. The type file:file_info() has been cleaned up. The type file:fd() has been made opaque in the documentation. The type nodes() has been removed from erl_bif_types.erl.
2011-05-12Types and specifications have been modified and addedHans Bolinder
2011-01-17Removed use of deprecated function sizeIngela Anderton Andin
2010-12-07Improve pad character handling in base64 MIME decoding functionsThomas O'Dowd
Implement the 'MAY' clauses from RFC4648 regarding the pad character to make mime_decode() and mime_decode_to_string() functions more tolerant of badly padded base64. The RFC is quoted below for easy reference. RFC4648 Section 3.3 with reference to MIME decoding: Furthermore, such specifications MAY ignore the pad character, "=", treating it as non-alphabet data, if it is present before the end of the encoded data. If more than the allowed number of pad characters is found at the end of the string (e.g., a base 64 string terminated with "==="), the excess pad characters MAY also be ignored.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP