'Move file pointer.
:param offset: Offset in bytes.
:param mode: Starting position. Use 0 for beginning of region, 1
for current offset, and 2 for end of region.  You cannot move
the pointer outside the defined region.'

def seek(self, offset, mode=0):

    if (mode == 1):
        self.pos = (self.pos + offset)
    elif (mode == 2):
        self.pos = (self.length + offset)
    else:
        self.pos = offset
    self.pos = max(0, min(self.pos, self.length))
    self.fh.seek((self.offset + self.pos))
