Lines Matching full:tag
29 class Tag: class
32 self.tag = args[0]
49 self.tag = (type << 20) | (id << 10) | size
55 return not bool(self.tag & 0x80000000)
59 return not bool(self.tag & 0x40000000)
63 return bool(self.tag & 0x20000000)
67 return not bool(self.tag & 0x10000000)
71 return (self.tag & 0x7ff00000) >> 20
75 return (self.tag & 0x70000000) >> 20
79 return (self.tag & 0x7ff00000) >> 20
83 return (self.tag & 0x000ffc00) >> 10
87 return (self.tag & 0x000003ff) >> 0
105 return Tag(
111 ntag = Tag(self.type, nid, self.size)
141 return 'Tag(%r, %d, %d)' % (self.typerepr(), self.id, self.size)
150 return self.tag
153 return self.tag
178 tag = Tag(0xffffffff)
185 tag = Tag(int(tag) ^ ntag)
186 tag.off = off + 4
187 tag.data = block[off+4:off+tag.dsize]
188 if tag.is_('crc'):
191 crc = binascii.crc32(block[off:off+tag.dsize], crc)
192 tag.crc = crc
193 off += tag.dsize
195 self.all_.append(tag)
197 if tag.is_('crc'):
204 # reset tag parsing
206 tag = Tag(int(tag) ^ ((tag.type & 1) << 31))
210 lambda id: Tag('name', id, 0) in self,
215 for tag in self.log:
216 if tag.is_('crc') or tag.is_('splice'):
218 elif tag.id == 0x3ff:
219 if tag in self and self[tag] is tag:
220 self.tags.append(tag)
225 ntag = tag.chid(id)
226 if ntag in self and self[ntag] is tag:
256 for tag in reversed(self.log):
257 if (gmask.id != 0 and tag.is_('splice') and
258 tag.id <= gtag.id - gdiff):
259 if tag.is_('create') and tag.id == gtag.id - gdiff:
263 gdiff += tag.schunk
265 if ((int(gmask) & int(tag)) ==
267 if tag.size == 0x3ff:
271 return tag
277 'off', 'tag', 'type', 'id', 'len'))
282 for tag in tags:
284 tag.off, tag,
285 tag.typerepr(), tag.idrepr(), tag.sizerepr()))
288 ' '.join('%02x' % c for c in tag.data[:8]),
290 for c in map(chr, tag.data[:8]))))
293 for i in range(0, len(tag.data), 16):
295 tag.off+i,
296 ' '.join('%02x' % c for c in tag.data[i:i+16]),
298 for c in map(chr, tag.data[i:i+16]))))
323 mdir.tail = mdir[Tag('tail', 0, 0)]