blob: 1829b40374a7b7ead294d1a57f8748bc781802bd [file] [log] [blame]
Fred Drake295da241998-08-10 19:42:37 +00001\section{\module{binhex} ---
2 Encode and decode files in binhex4 format.}
Fred Drakeb91e9341998-07-23 17:59:49 +00003\declaremodule{standard}{binhex}
4
5\modulesynopsis{Encode and decode files in binhex4 format.}
6
Fred Drake1aabe5e1998-02-19 18:29:18 +00007
8This module encodes and decodes files in binhex4 format, a format
Fred Drakefc576191998-04-04 07:15:02 +00009allowing representation of Macintosh files in \ASCII{}. On the Macintosh,
Fred Drake1aabe5e1998-02-19 18:29:18 +000010both forks of a file and the finder information are encoded (or
11decoded), on other platforms only the data fork is handled.
12
Fred Drakefc576191998-04-04 07:15:02 +000013The \module{binhex} module defines the following functions:
Fred Drake1aabe5e1998-02-19 18:29:18 +000014
Fred Drakecce10901998-03-17 06:33:25 +000015\begin{funcdesc}{binhex}{input, output}
Fred Drake1aabe5e1998-02-19 18:29:18 +000016Convert a binary file with filename \var{input} to binhex file
17\var{output}. The \var{output} parameter can either be a filename or a
18file-like object (any object supporting a \var{write} and \var{close}
19method).
20\end{funcdesc}
21
Fred Drakecce10901998-03-17 06:33:25 +000022\begin{funcdesc}{hexbin}{input\optional{, output}}
Fred Drake1aabe5e1998-02-19 18:29:18 +000023Decode a binhex file \var{input}. \var{input} may be a filename or a
24file-like object supporting \var{read} and \var{close} methods.
25The resulting file is written to a file named \var{output}, unless the
26argument is empty in which case the output filename is read from the
27binhex file.
28\end{funcdesc}
29
30\subsection{Notes}
31There is an alternative, more powerful interface to the coder and
32decoder, see the source for details.
33
34If you code or decode textfiles on non-Macintosh platforms they will
Fred Drakefc576191998-04-04 07:15:02 +000035still use the Macintosh newline convention (carriage-return as end of
Fred Drake1aabe5e1998-02-19 18:29:18 +000036line).
37
Fred Drakefc576191998-04-04 07:15:02 +000038As of this writing, \function{hexbin()} appears to not work in all
39cases.