mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
* src/jlib.erl: Fix recursive call to speedup base64
decoding (thanks to Jeffrey Rogiers)(EJAB-333) SVN Revision: 2041
This commit is contained in:
parent
fc9ba11afe
commit
e1fd7c444e
@ -1,3 +1,8 @@
|
||||
2009-04-27 Badlop <badlop@process-one.net>
|
||||
|
||||
* src/jlib.erl: Fix recursive call to speedup base64
|
||||
decoding (thanks to Jeffrey Rogiers)(EJAB-333)
|
||||
|
||||
2009-04-24 Christophe Romain <christophe.romain@process-one.net>
|
||||
|
||||
* src/odbc/ejabberd_odbc.erl: allow to run query bloc as erlang
|
||||
|
@ -702,7 +702,7 @@ decode1_base64([Sextet1,Sextet2,$=,$=|Rest]) ->
|
||||
(d(Sextet1) bsl 18) bor
|
||||
(d(Sextet2) bsl 12),
|
||||
Octet1=Bits2x6 bsr 16,
|
||||
[Octet1|decode_base64(Rest)];
|
||||
[Octet1|decode1_base64(Rest)];
|
||||
decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
|
||||
Bits3x6=
|
||||
(d(Sextet1) bsl 18) bor
|
||||
@ -710,7 +710,7 @@ decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
|
||||
(d(Sextet3) bsl 6),
|
||||
Octet1=Bits3x6 bsr 16,
|
||||
Octet2=(Bits3x6 bsr 8) band 16#ff,
|
||||
[Octet1,Octet2|decode_base64(Rest)];
|
||||
[Octet1,Octet2|decode1_base64(Rest)];
|
||||
decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
|
||||
Bits4x6=
|
||||
(d(Sextet1) bsl 18) bor
|
||||
@ -720,7 +720,7 @@ decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
|
||||
Octet1=Bits4x6 bsr 16,
|
||||
Octet2=(Bits4x6 bsr 8) band 16#ff,
|
||||
Octet3=Bits4x6 band 16#ff,
|
||||
[Octet1,Octet2,Octet3|decode_base64(Rest)];
|
||||
[Octet1,Octet2,Octet3|decode1_base64(Rest)];
|
||||
decode1_base64(_CatchAll) ->
|
||||
"".
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user