This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Heavy duty Base64 decoding.

Help for those learning Tcl or writing their own scripts.
Post Reply
e
experts
Voice
Posts: 4
Joined: Mon Jun 18, 2007 3:47 am

Heavy duty Base64 decoding.

Post by experts »

Hi guys,

I need to decode a lot of base64 encoded messages. Something to the order of 70 per second.
I heard that it would be better writing a c module to do the decoding rather than decode purely using a tcl script.
Is this true?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

top level C code is faster and more effective than TCL, so yes i would agree C is better for this kind of job.
r0t3n @ #r0t3n @ Quakenet
e
experts
Voice
Posts: 4
Joined: Mon Jun 18, 2007 3:47 am

Post by experts »

Heyz, thanks for the info.
Do you know a very basic C module written for eggdrop scripts?
I am not so sure on the interfacing.
I am more used to coding in C for mirc.
Would appreciate any help pointing me to a guide or an example on how to write a C module for tcl scripts.
As for the base 64 encoding and decoding part. that is not a prob. I just need the interfacing format.

Thanks!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

#### WOOBIE MODULE ####

# This is for demonstrative purposes only. If you are looking for starting
# point in writing modules, woobie is the right thing.
#loadmodule woobie
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Depending on how you're going to use it, consider making it a tcl extension.

Check http://tcl.tk/man/tcl8.4/TclLib/contents.htm for the C functions that a Tcl extended C program may use.
Have you ever read "The Manual"?
Post Reply