base64 encoding using the new binary syntax

Sean Hinde <>
Mon Sep 25 21:37:37 CEST 2000

Some more observations:

If in the shell you do:

74> A=lists:duplicate(40000,3).                         
75> B=list_to_binary(A).                                
<<3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3|... 40000
76> <<B/binary,B/binary>>.
<<3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3|... 80000
77> A++A.

<<B/binary,B/binary>> visibly takes ages but A++A. returns immediately!


79> io:format("~p",[<<B/binary>>]). 


80> io:format("~p",[B]).  

doesn't look very correct.


This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list