def __eq__(self, other):
        return (isinstance(other, self.__class__) and
                other.package == self.package)
def _pad(self, s):
        return s + (self.bs - len(s) % self.bs) * chr(self.bs - len(s) % self.bs)