equal
deleted
inserted
replaced
144 blocksize = max(self.datasize - blockstart, 0) |
144 blocksize = max(self.datasize - blockstart, 0) |
145 data = self.dataf.read(blocksize) |
145 data = self.dataf.read(blocksize) |
146 lend = len(data) / self.s |
146 lend = len(data) / self.s |
147 i = blockstart / self.s |
147 i = blockstart / self.s |
148 off = 0 |
148 off = 0 |
|
149 # lazyindex supports __delitem__ |
|
150 if lend > len(self.index) - i: |
|
151 lend = len(self.index) - i |
149 for x in xrange(lend): |
152 for x in xrange(lend): |
150 if self.index[i + x] == None: |
153 if self.index[i + x] == None: |
151 b = data[off : off + self.s] |
154 b = data[off : off + self.s] |
152 self.index[i + x] = b |
155 self.index[i + x] = b |
153 n = b[self.shaoffset:self.shaoffset + 20] |
156 n = b[self.shaoffset:self.shaoffset + 20] |