.TH BENCODE 1 "9 January 1988" .UC 4 .SH NAME bencode, bdecode \- encode a binary file into printable ASCII; decode it back into binary. .SH SYNOPSIS .B bencode [source] .br .B bdecode [source] .SH DESCRIPTION .I Bencode is used to a encode a binary file into printable ASCII, and .I bdecode is used to decode an encoded file back into binary. These functions are typically used to package a binary file for mailing. .PP .I Bencode takes the named source file (the default is standard input) and produces an encoded version on the standard output. The encoding uses only the ASCII characters ``A'' \- ``Z'', ``a'' \- ``z'', ``0'' \- ``9'', ``+'', and ``-''. The ASCII characters blank, newline, and ``/'' also appear in the encoded file, but do not represent encoded bits. The encoded file is terminated with a byte count and cyclic redundancy check for detecting corrupted files. .PP .I Bdecode reads a file encoded by bencode (the default is standard input), strips off any leading and trailing lines added by mailers, and writes the decoded version to standard output. .PP These functions are similar to .I uuencode and .I uudecode, but are more robust because of the CRC check and because they don't send characters like ``^'' and ``\\'', which are likely to get mangled if the file should happen to pass through a non-ASCII machine. .PP .SH SEE\ ALSO uuencode(1) .SH AUTHORS Ken Lalonde and Reg Quinton .SH BUGS The file is expanded by 35% (3 bytes become 4 plus control information) causing it to take longer to transmit.