This code translate input file to uuencode or base64 formats
( and works fine and fast ).
Examples:
./coder coder.cpp uuencode filename.cpp
./coder coder.cpp base64 filename.cpp
- second file name (filename.cpp) used only for uuencode generation
( for output in header like this is
begin 644 coder.cpp
)
Use this command (under unix) to compile coder.cpp program:
cc -o coder coder.cpp
( or compile coder.cpp under Windows using Visual C++ or Borland C++ or any
other compilers )
Information:
This algorithm developed for sending e-mails system, for attachment
files (and tested during two years of real work - no bugs were detected).
There is a copy of this algorithm in Perl, but it is too slow, so I used
call to
./coder [params]
program that created using C++ language.
Alexander Larkin.
software@keromail.com
*****
P.S.
There is
enc.pl
program that is the same algorithm, but in Perl.
Parameters for enc.pl program is params of function that
you may see on first line of enc.pl program.
*****
P.S.
Output (result of this program) is something like this:
begin 644 coder.cpp
M(VEN8VQU9&4@(G-T9&EO+F@B"B-I;F-L=61E(")S=')I;F
To: Larkin Alexander
Date: Tue, 17 Dec 2002 00:42:46 +0300 (MSK)
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 8bit
Subject: There is a file in attachment.
Hello.
How are you?
See file.
begin 644 net_ware6_promo.zip
M4$L#!!0````(`#)FD"W#,O/4V2````N`@`3````;F5T7W=A
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0035_01BFDAD2.1CFA5B60"
X-Priority: 3
X-MSMail-Priority: Normal
Subject: Promotion bulletin 09.07.01
This is a multi-part message in MIME format.
------=_NextPart_000_0035_01BFDAD2.1CFA5B60
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 8bit
Hello.
How are you?
See file.
------=_NextPart_000_0035_01BFDAD2.1CFA5B60
Content-Type: application/x-zip-compressed;
name="promo_8m.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="promo_8m.zip"
UEsDBBQAAAAIAFRt6SrsP+OgD6kAAABOBgAMAAAAcHJvbW9fOG0ueGxz7J0HXBTX9+jvwipYwYYV
GEARFNi+LCrSsQEiRbC7wFKU5lLEysbeY080xsTENKOxRVJVNJYYjcYUxRiVdI0YMUZjbPvuPffO
...
G1BLAQIUABQAAAAIAFRt6SrsP+OgD6kAAABOBgAMAAAAAAAAAAAAIAC2gQAAAABwcm9tb184bS54
bHNQSwUGAAAAAAEAAQA6AAAAOakAAAAACg==
------=_NextPart_000_0035_01BFDAD2.1CFA5B60--
Runs under: Windows 3.1x,Win95,MS-DOS,Unix,Linux,WinNT,Windows 2000,WinXP,Win98