Dec 072017
 
Binary-TO-Ascii encode/decode is similar to uuencode but produces smaller files with error detection and correction. It is superior to most other encoding schemes and is used by many FTP mail servers. Full C source code.
File BTOA.ZIP from The Programmer’s Corner in
Category C Source Code
Binary-TO-Ascii encode/decode is similar to uuencode but produces smaller files with error detection and correction. It is superior to most other encoding schemes and is used by many FTP mail servers. Full C source code.
File Name File Size Zip Size Zip Type
ATOB.C 9140 2383 deflated
BTOA.1 3690 1644 deflated
BTOA.C 8055 2372 deflated
BTOA.DOC 4273 1757 deflated
BTOA.H 1764 671 deflated
CHKSUM.H 805 286 deflated
MAKEFILE 226 109 deflated
README 3228 1540 deflated
REPAIR.C 8293 1909 deflated

Download File BTOA.ZIP Here

Contents of the README file


BTOA version 5.2
------------------
Written by Paul Rutter, Joe Orost & Stefan Parmark.


Btoa was created from atob/btoa which were submitted to Usenet
by Paul E. Rutter. Atob and btoa has now been merged into one
program, now refered to as btoa.

Btoa converts 4 binary characters to 5 ascii ones, causing a 25%
expansion. Spaces will not be used, which should make it safe
to send files over Usenet without risking that blanks become
tabs.

Decoding, which previously was done with atob, is now an option
of btoa. See the manual for details.

One of the drawbacks with the previous version of btoa was that,
if there was an error in the file, atob only stated so, but gave
no clue to its location. It used a checksum covering the
total file, making it impossible to detect where the error was.
I added a single-byte checksum for each row.

Further, the file contained no information about the name of the
output file. Rather, stdout was used. Version 5.0 has the feature
to name the file contents. It can be turned off by reading data
from stdin.

A totally new feature is the ability to mend corrupted archives.
This can be done as long as the header and last line are OK.
It detects bad lines, informs the remote computer about this,
which retransmits these lines in a special file, which btoa uses
to repair the archive. See the manual for more details.

Btoa uses characters between '!' and 'u'. Special characters are
'z' meaning 4 consecutive zeros, 'y' meaning 4 spaces, and
'x' as an end-of-archive mark. The 'y' was added be me, and will
not be recognized by the old version.

Old btoa encoding is still possible, as an extra option (see the
manual). When decoding, btoa can tell if it's the old or new btoa
format by looking at the header.

I removed the feature to exit with no output if there was en error
in the archive. This was done by using a temporary file for
storage. This is not a good idea for micro computer folks like
me, with limited storage possibilities. I hope all realize that
you shouldn't run a file that was created from a corrupted archive.

Most of the code was rewritten in order to make it execute faster.
Special efforts have been made to optimize the atob part.
Measured speeds are 30 kbyte/s on a Sun-3 and 4 kbyte/s on an
Amiga. On the Amiga I used the VD0: recoverable RAM disk without
FFS.

I have tested btoa on an Amiga 1000 and a Sun-3, and it has
worked very well. If you find it doesn't work on your favourite
computer, drop me a note to one of the addresses below, preferably
the top one, and I'll see what I can do. Also, if you port and/or
improve it, please send me the diffs, and I'll include them in the
next release.

---------------------- DISCLAIMER -------------------------------

I assume no responsibility for the use of btoa. It should work OK,
and I have included lots of tests to make sure that files open,
end-of-file is detected, etc.

Btoa is in the public domain. You may use it, give it away, and
make improvements, as long as the names of the developers are
mentioned and you don't use it to earn money. It may NOT be used
commercially without my permission.

/Stefan Parmark
[email protected]
[email protected]


 December 7, 2017  Add comments

Leave a Reply