Example #1
0
 def pickleIndexItem(self):
     import io
     result = io.BytesIO()
     from picklestream import PickleStream
     stream = PickleStream(result)
     stream.writeObject(self.encodedIndexItem)
     self.pickledIndexItem = result.getvalue()
Example #2
0
def loadIndex(stream):
    from picklestream import PickleStream
    stream = PickleStream(stream)
    result = []
    while True:
        try:
            result.append(stream.readObject())
        except EOFError:
            break
    return result