mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37: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
fd5e312ed9
commit
028509c3a9
@ -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>
|
2009-04-24 Christophe Romain <christophe.romain@process-one.net>
|
||||||
|
|
||||||
* src/odbc/ejabberd_odbc.erl: allow to run query bloc as erlang
|
* src/odbc/ejabberd_odbc.erl: allow to run query bloc as erlang
|
||||||
|
@ -297,7 +297,7 @@ decode1_base64([Sextet1,Sextet2,$=,$=|Rest]) ->
|
|||||||
(d(Sextet1) bsl 18) bor
|
(d(Sextet1) bsl 18) bor
|
||||||
(d(Sextet2) bsl 12),
|
(d(Sextet2) bsl 12),
|
||||||
Octet1=Bits2x6 bsr 16,
|
Octet1=Bits2x6 bsr 16,
|
||||||
[Octet1|decode_base64(Rest)];
|
[Octet1|decode1_base64(Rest)];
|
||||||
decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
|
decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
|
||||||
Bits3x6=
|
Bits3x6=
|
||||||
(d(Sextet1) bsl 18) bor
|
(d(Sextet1) bsl 18) bor
|
||||||
@ -305,7 +305,7 @@ decode1_base64([Sextet1,Sextet2,Sextet3,$=|Rest]) ->
|
|||||||
(d(Sextet3) bsl 6),
|
(d(Sextet3) bsl 6),
|
||||||
Octet1=Bits3x6 bsr 16,
|
Octet1=Bits3x6 bsr 16,
|
||||||
Octet2=(Bits3x6 bsr 8) band 16#ff,
|
Octet2=(Bits3x6 bsr 8) band 16#ff,
|
||||||
[Octet1,Octet2|decode_base64(Rest)];
|
[Octet1,Octet2|decode1_base64(Rest)];
|
||||||
decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
|
decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
|
||||||
Bits4x6=
|
Bits4x6=
|
||||||
(d(Sextet1) bsl 18) bor
|
(d(Sextet1) bsl 18) bor
|
||||||
@ -315,7 +315,7 @@ decode1_base64([Sextet1,Sextet2,Sextet3,Sextet4|Rest]) ->
|
|||||||
Octet1=Bits4x6 bsr 16,
|
Octet1=Bits4x6 bsr 16,
|
||||||
Octet2=(Bits4x6 bsr 8) band 16#ff,
|
Octet2=(Bits4x6 bsr 8) band 16#ff,
|
||||||
Octet3=Bits4x6 band 16#ff,
|
Octet3=Bits4x6 band 16#ff,
|
||||||
[Octet1,Octet2,Octet3|decode_base64(Rest)];
|
[Octet1,Octet2,Octet3|decode1_base64(Rest)];
|
||||||
decode1_base64(_CatchAll) ->
|
decode1_base64(_CatchAll) ->
|
||||||
"".
|
"".
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user