MCPcopy Index your code
hub / github.com/clips/pattern / __init__

Method __init__

pattern/web/pdf/pdffont.py:246–254  ·  view source on GitHub ↗
(self, fp)

Source from the content-addressed store, hash-verified

244 class INDEX(object):
245
246 def __init__(self, fp):
247 self.fp = fp
248 self.offsets = []
249 (count, offsize) = struct.unpack('>HB', self.fp.read(3))
250 for i in xrange(count+1):
251 self.offsets.append(nunpack(self.fp.read(offsize)))
252 self.base = self.fp.tell()-1
253 self.fp.seek(self.base+self.offsets[-1])
254 return
255
256 def __repr__(self):
257 return '<INDEX: size=%d>' % len(self)

Callers

nothing calls this directly

Calls 5

nunpackFunction · 0.90
tellMethod · 0.80
readMethod · 0.45
appendMethod · 0.45
seekMethod · 0.45

Tested by

no test coverage detected