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