def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def _pad(self, s):
        return s + (self.bs - len(s) % self.bs) * chr(self.bs - len(s) % self.bs)