Module binhex
[hide private]
[frames] | no frames]

Module binhex

Macintosh binhex compression/decompression.

easy interface: binhex(inputfilename, outputfilename) hexbin(inputfilename, outputfilename)

Classes [hide private]
Error
FInfo
openrsrc
_Hqxcoderengine
Write data to the coder in 3-byte chunks
_Rlecoderengine
Write data to the RLE-coder in suitably large chunks
BinHex
_Hqxdecoderengine
Read data via the decoder in 4-byte chunks
_Rledecoderengine
Read data via the RLE-coder
HexBin
Functions [hide private]
 
getfileinfo(name)
 
binhex(inp, out)
(infilename, outfilename) - Create binhex-encoded copy of a file
 
hexbin(inp, out)
(infilename, outfilename) - Decode binhexed file
 
_test()
Variables [hide private]
  _DID_RSRC = 2
  _DID_DATA = 1
  _DID_HEADER = 0
  REASONABLY_LARGE = 32768
  LINELEN = 64
  RUNCHAR = '\x90'

Imports: sys, os, struct, binascii, FSSpec, openrf