Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libbinascii.tex @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 5b2ed6081eb9 |
| children | 3468ea8645ca |
| rev | line source |
|---|---|
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 \section{Standard module \sectcode{binhex}} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 \stmodindex{binhex} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 This module encodes and decodes files in binhex4 format, a format |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 allowing representation of Macintosh files in ASCII. On the macintosh, |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
6 both forks of a file and the finder information are encoded (or |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 decoded), on other platforms only the data fork is handled. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 The \code{binhex} module defines the following functions: |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 \renewcommand{\indexsubitem}{(in module binhex)} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
13 \begin{funcdesc}{binhex}{input\, output} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
14 Convert a binary file with filename \var{input} to binhex file |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
15 \var{output}. The \var{output} parameter can either be a filename or a |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
16 file-like object (any object supporting a \var{write} and \var{close} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
17 method). |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
18 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
19 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
20 \begin{funcdesc}{hexbin}{input\optional{\, output}} |
|
5345
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
21 Decode a binhex file \var{input}. \var{input} may be a filename or a |
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
22 file-like object supporting \var{read} and \var{close} methods. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
23 The resulting file is written to a file named \var{output}, unless the |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
24 argument is empty in which case the output filename is read from the |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
25 binhex file. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
26 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
27 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
28 \subsection{notes} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
29 There is an alternative, more powerful interface to the coder and |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
30 decoder, see the source for details. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
31 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
32 If you code or decode textfiles on non-Macintosh platforms they will |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
33 still use the macintosh newline convention (carriage-return as end of |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
34 line). |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
35 |
|
3033
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
36 As of this writing, \var{hexbin} appears to not work in all cases. |
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
37 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
38 \section{Standard module \sectcode{uu}} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
39 \stmodindex{uu} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
40 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
41 This module encodes and decodes files in uuencode format, allowing |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
42 arbitrary binary data to be transferred over ascii-only connections. |
|
5345
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
43 Wherever a file argument is expected, the methods accept a file-like |
|
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
44 object. For backwards compatibility, a string containing a pathname |
|
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
45 is also accepted, and the corresponding file will be opened for |
|
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
46 reading and writing; the pathname \code{'-'} is understood to mean the |
|
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
47 standard input or output. However, this interface is deprecated; it's |
|
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
48 better for the caller to open the file itself, and be sure that, when |
|
5b2ed6081eb9
Note that passing a filename to uu.{en,de}code() is deprecated.
Guido van Rossum <guido@python.org>
parents:
3193
diff
changeset
|
49 required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS. |
|
3033
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
50 |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
51 This code was contributed by Lance Ellinghouse, and modified by Jack |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
52 Jansen. |
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
53 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
54 The \code{uu} module defines the following functions: |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
55 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
56 \renewcommand{\indexsubitem}{(in module uu)} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
57 |
|
3033
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
58 \begin{funcdesc}{encode}{in_file\, out_file\optional{\, name\, mode}} |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
59 Uuencode file \var{in_file} into file \var{out_file}. The uuencoded |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
60 file will have the header specifying \var{name} and \var{mode} as the |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
61 defaults for the results of decoding the file. The default defaults |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
62 are taken from \var{in_file}, or \code{'-'} and \code{0666} |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
63 respectively. |
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
64 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
65 |
|
3033
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
66 \begin{funcdesc}{decode}{in_file\optional{\, out_file\, mode}} |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
67 This call decodes uuencoded file \var{in_file} placing the result on |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
68 file \var{out_file}. If \var{out_file} is a pathname the \var{mode} is |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
69 also set. Defaults for \var{out_file} and \var{mode} are taken from |
|
47d8bcabd176
Documented new argument order.
Jack Jansen <jack.jansen@cwi.nl>
parents:
3025
diff
changeset
|
70 the uuencode header. |
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
71 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
72 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
73 \section{Built-in Module \sectcode{binascii}} % If implemented in C |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
74 \bimodindex{binascii} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
75 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
76 The binascii module contains a number of methods to convert between |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
77 binary and various ascii-encoded binary representations. Normally, you |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
78 will not use these modules directly but use wrapper modules like |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
79 \var{uu} or \var{hexbin} in stead, this module solely exists because |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
80 bit-manipuation of large amounts of data is slow in python. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
81 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
82 The \code{binascii} module defines the following functions: |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
83 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
84 \renewcommand{\indexsubitem}{(in module binascii)} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
85 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
86 \begin{funcdesc}{a2b_uu}{string} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
87 Convert a single line of uuencoded data back to binary and return the |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
88 binary data. Lines normally contain 45 (binary) bytes, except for the |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
89 last line. Line data may be followed by whitespace. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
90 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
91 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
92 \begin{funcdesc}{b2a_uu}{data} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
93 Convert binary data to a line of ascii characters, the return value is |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
94 the converted line, including a newline char. The length of \var{data} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
95 should be at most 45. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
96 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
97 |
| 3193 | 98 \begin{funcdesc}{a2b_base64}{string} |
| 99 Convert a block of base64 data back to binary and return the | |
| 100 binary data. More than one line may be passed at a time. | |
| 101 \end{funcdesc} | |
| 102 | |
| 103 \begin{funcdesc}{b2a_base64}{data} | |
| 104 Convert binary data to a line of ascii characters in base64 coding. | |
| 105 The return value is the converted line, including a newline char. | |
| 106 The length of \var{data} should be at most 57 to adhere to the base64 | |
| 107 standard. | |
| 108 \end{funcdesc} | |
| 109 | |
|
3025
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
110 \begin{funcdesc}{a2b_hqx}{string} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
111 Convert binhex4 formatted ascii data to binary, without doing |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
112 rle-decompression. The string should contain a complete number of |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
113 binary bytes, or (in case of the last portion of the binhex4 data) |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
114 have the remaining bits zero. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
115 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
116 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
117 \begin{funcdesc}{rledecode_hqx}{data} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
118 Perform RLE-decompression on the data, as per the binhex4 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
119 standard. The algorithm uses \code{0x90} after a byte as a repeat |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
120 indicator, followed by a count. A count of \code{0} specifies a byte |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
121 value of \code{0x90}. The routine returns the decompressed data, |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
122 unless data input data ends in an orphaned repeat indicator, in which |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
123 case the \var{Incomplete} exception is raised. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
124 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
125 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
126 \begin{funcdesc}{rlecode_hqx}{data} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
127 Perform binhex4 style RLE-compression on \var{data} and return the |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
128 result. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
129 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
130 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
131 \begin{funcdesc}{b2a_hqx}{data} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
132 Perform hexbin4 binary-to-ascii translation and return the resulting |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
133 string. The argument should already be rle-coded, and have a length |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
134 divisible by 3 (except possibly the last fragment). |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
135 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
136 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
137 \begin{funcdesc}{crc_hqx}{data, crc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
138 Compute the binhex4 crc value of \var{data}, starting with an initial |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
139 \var{crc} and returning the result. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
140 \end{funcdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
141 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
142 \begin{excdesc}{Error} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
143 Exception raised on errors. These are usually programming errors. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
144 \end{excdesc} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
145 |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
146 \begin{excdesc}{Incomplete} |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
147 Exception raised on incomplete data. These are usually not programming |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
148 errors, but handled by reading a little more data and trying again. |
|
3911d4a89ab0
Documented binascii, binhex and uu modules. Put them in the
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
149 \end{excdesc} |
