Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
_Hqxcoderengine Class Reference

Public Member Functions

def __init__
 
def write
 
def close
 

Data Fields

 ofp
 
 data
 
 hqxdata
 
 linelen
 

Detailed Description

Write data to the coder in 3-byte chunks

Definition at line 119 of file binhex.py.

Constructor & Destructor Documentation

def __init__ (   self,
  ofp 
)

Definition at line 122 of file binhex.py.

123  def __init__(self, ofp):
124  self.ofp = ofp
125  self.data = ''
126  self.hqxdata = ''
127  self.linelen = LINELEN-1

Member Function Documentation

def close (   self)

Definition at line 150 of file binhex.py.

References _Hqxcoderengine._flush(), _Hqxcoderengine.data, simple_producer.data, _Hqxcoderengine.hqxdata, and _Hqxcoderengine.ofp.

151  def close(self):
152  if self.data:
153  self.hqxdata = \
154  self.hqxdata + binascii.b2a_hqx(self.data)
155  self._flush(1)
156  self.ofp.close()
157  del self.ofp
def write (   self,
  data 
)

Definition at line 128 of file binhex.py.

References _Hqxcoderengine._flush(), _Hqxcoderengine.data, simple_producer.data, _Hqxcoderengine.hqxdata, and _Hqxcoderengine.linelen.

129  def write(self, data):
130  self.data = self.data + data
131  datalen = len(self.data)
132  todo = (datalen//3)*3
133  data = self.data[:todo]
134  self.data = self.data[todo:]
135  if not data:
136  return
137  self.hqxdata = self.hqxdata + binascii.b2a_hqx(data)
138  self._flush(0)

Field Documentation

data

Definition at line 124 of file binhex.py.

hqxdata

Definition at line 125 of file binhex.py.

linelen

Definition at line 126 of file binhex.py.

ofp

Definition at line 123 of file binhex.py.


The documentation for this class was generated from the following file: