1998-08-10 16:42:37 -03:00
|
|
|
\section{\module{binhex} ---
|
1999-02-19 20:14:17 -04:00
|
|
|
Encode and decode binhex4 files}
|
1998-07-23 14:59:49 -03:00
|
|
|
|
1999-02-19 20:14:17 -04:00
|
|
|
\declaremodule{standard}{binhex}
|
1998-07-23 14:59:49 -03:00
|
|
|
\modulesynopsis{Encode and decode files in binhex4 format.}
|
|
|
|
|
1998-02-19 14:29:18 -04:00
|
|
|
|
|
|
|
This module encodes and decodes files in binhex4 format, a format
|
2001-11-28 03:26:15 -04:00
|
|
|
allowing representation of Macintosh files in \ASCII. On the Macintosh,
|
1998-02-19 14:29:18 -04:00
|
|
|
both forks of a file and the finder information are encoded (or
|
|
|
|
decoded), on other platforms only the data fork is handled.
|
|
|
|
|
1998-04-04 03:15:02 -04:00
|
|
|
The \module{binhex} module defines the following functions:
|
1998-02-19 14:29:18 -04:00
|
|
|
|
1998-03-17 02:33:25 -04:00
|
|
|
\begin{funcdesc}{binhex}{input, output}
|
1998-02-19 14:29:18 -04:00
|
|
|
Convert a binary file with filename \var{input} to binhex file
|
|
|
|
\var{output}. The \var{output} parameter can either be a filename or a
|
1999-04-23 12:41:53 -03:00
|
|
|
file-like object (any object supporting a \method{write()} and
|
|
|
|
\method{close()} method).
|
1998-02-19 14:29:18 -04:00
|
|
|
\end{funcdesc}
|
|
|
|
|
1998-03-17 02:33:25 -04:00
|
|
|
\begin{funcdesc}{hexbin}{input\optional{, output}}
|
1998-02-19 14:29:18 -04:00
|
|
|
Decode a binhex file \var{input}. \var{input} may be a filename or a
|
1999-04-23 12:41:53 -03:00
|
|
|
file-like object supporting \method{read()} and \method{close()} methods.
|
1998-02-19 14:29:18 -04:00
|
|
|
The resulting file is written to a file named \var{output}, unless the
|
1999-04-23 12:41:53 -03:00
|
|
|
argument is omitted in which case the output filename is read from the
|
1998-02-19 14:29:18 -04:00
|
|
|
binhex file.
|
|
|
|
\end{funcdesc}
|
|
|
|
|
1999-04-23 12:41:53 -03:00
|
|
|
|
|
|
|
\begin{seealso}
|
2000-10-18 14:43:06 -03:00
|
|
|
\seemodule{binascii}{Support module containing \ASCII-to-binary
|
|
|
|
and binary-to-\ASCII{} conversions.}
|
1999-04-23 12:41:53 -03:00
|
|
|
\end{seealso}
|
|
|
|
|
|
|
|
|
1999-02-19 20:14:17 -04:00
|
|
|
\subsection{Notes \label{binhex-notes}}
|
|
|
|
|
1998-02-19 14:29:18 -04:00
|
|
|
There is an alternative, more powerful interface to the coder and
|
|
|
|
decoder, see the source for details.
|
|
|
|
|
|
|
|
If you code or decode textfiles on non-Macintosh platforms they will
|
1998-04-04 03:15:02 -04:00
|
|
|
still use the Macintosh newline convention (carriage-return as end of
|
1998-02-19 14:29:18 -04:00
|
|
|
line).
|
|
|
|
|
1998-04-04 03:15:02 -04:00
|
|
|
As of this writing, \function{hexbin()} appears to not work in all
|
|
|
|
cases.
|