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