home *** CD-ROM | disk | FTP | other *** search
- From: wilber@gauss.UUCP (Bob Wilber)
- Newsgroups: comp.sources.misc
- Subject: v02i028: man page for bencode/bdecode
- Message-ID: <7153@ncoast.UUCP>
- Date: 30 Jan 88 21:34:36 GMT
- Approved: allbery@ncoast.UUCP
-
- Comp.sources.misc: Volume 2, Issue 28
- Submitted-By: Bob Wilber <wilber@gauss.UUCP>
- Archive-Name: bencode-man
-
- I just snarfed bencode/bdecode off comp.sources.misc. Here's a man page
- I wrote that you might want to add to the shar file. (Use nroff -man.)
-
- Bob Wilber wilber@research.att.com or ihnp4!gauss!wilber or
- wilber%btl@csnet
-
- ----------------- Cut Here ---------------------------------------------------
- #! /bin/sh
- # "sh" this file to produce the file "bencode.1"
- sed 's/^X//' << \_END_ > bencode.1
- X.TH BENCODE 1 "9 January 1988"
- X.UC 4
- X.SH NAME
- Xbencode, bdecode \- encode a binary file into printable ASCII; decode it back
- Xinto binary.
- X.SH SYNOPSIS
- X.B /usr/local/bin/bencode [source]
- X.br
- X.B /usr/local/bin/bdecode [source]
- X.SH DESCRIPTION
- X.I Bencode
- Xis used to a encode a binary file into printable ASCII, and
- X.I bdecode
- Xis used to decode an encoded file back into binary.
- XThese functions are typically used to package a binary file for mailing.
- X.PP
- X.I Bencode
- Xtakes the named source file (the default is standard input) and
- Xproduces an encoded version on the standard output.
- XThe encoding uses only the ASCII characters ``A'' \- ``Z'', ``a'' \- ``z'', ``0''
- X\- ``9'', ``+'', and ``-''.
- XThe ASCII characters blank, newline, and ``/'' also appear in the
- Xencoded file, but do not represent encoded bits.
- XThe encoded file is terminated with
- Xa byte count and cyclic redundancy check for detecting corrupted files.
- X.PP
- X.I Bdecode
- Xreads a file encoded by bencode (the default is standard input), strips off
- Xany leading and trailing lines added by mailers,
- Xand writes the decoded version to standard output.
- X.PP
- XThese functions are similar to
- X.I uuencode
- Xand
- X.I uudecode,
- Xbut are more robust because of the CRC check and because
- Xthey don't send characters like ``^'' and ``\\'', which are likely to get
- Xmangled if the file should happen to pass through a
- Xnon-ASCII machine.
- X.PP
- X.SH SEE\ ALSO
- Xuuencode(1)
- X.SH AUTHORS
- XKen Lalonde and Reg Quinton
- X.SH BUGS
- XThe file is expanded by 35% (3 bytes become 4 plus control information)
- Xcausing it to take longer to transmit.
- _END_
- exit 0
-