by Tim Arheit (4 Submissions)
Category: Encryption
Compatability: Visual Basic 5.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
This is an optimized version of the common Base 64 encode/decode. It eliminates the repeditive calls to chr$() and asc(), as well as the linear searches I've seen in some routines. It also avoid shifting each byte encoded using multiplication and division.
This method does use a bit more memory in permanent lookup tables than most do. However, this eliminates the need for using vb's rather slow method of bit shifting (multiplication and division). A method I've not seen elsewhere.
It doesn't make much difference in the IDE, but does make a huge difference in the exe. On my machine it's as fast as commercial packages such as Eudora on encoding if not faster.