blob: a3e5f9af00f3fb8e5495ed0cd2b4153e25305e18 [file] [log] [blame]
Fred Drake295da241998-08-10 19:42:37 +00001\section{\module{binhex} ---
Fred Drakebbac4321999-02-20 00:14:17 +00002 Encode and decode binhex4 files}
Fred Drakeb91e9341998-07-23 17:59:49 +00003
Fred Drakebbac4321999-02-20 00:14:17 +00004\declaremodule{standard}{binhex}
Fred Drakeb91e9341998-07-23 17:59:49 +00005\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
Fred Drakebbac4321999-02-20 00:14:17 +000030\subsection{Notes \label{binhex-notes}}
31
Fred Drake1aabe5e1998-02-19 18:29:18 +000032There is an alternative, more powerful interface to the coder and
33decoder, see the source for details.
34
35If you code or decode textfiles on non-Macintosh platforms they will
Fred Drakefc576191998-04-04 07:15:02 +000036still use the Macintosh newline convention (carriage-return as end of
Fred Drake1aabe5e1998-02-19 18:29:18 +000037line).
38
Fred Drakefc576191998-04-04 07:15:02 +000039As of this writing, \function{hexbin()} appears to not work in all
40cases.