예제 #1
0
 def __getitem__(self, docnum):
     data = self._child[docnum]
     if not data:
         return []
     bio = BytesIO(data)
     count = read_varint(bio.read)
     out = []
     for _ in xrange(count):
         vlen = read_varint(bio.read)
         v = bio.read(vlen)
         out.append(v)
     return out
예제 #2
0
파일: columns.py 프로젝트: rsirres/Whoosh
 def __getitem__(self, docnum):
     data = self._child[docnum]
     if not data:
         return []
     bio = BytesIO(data)
     count = read_varint(bio.read)
     out = []
     for _ in xrange(count):
         vlen = read_varint(bio.read)
         v = bio.read(vlen)
         out.append(v)
     return out
예제 #3
0
 def read_svarint(self):
     """Reads a variable-length encoded signed integer from the wrapped
     file.
     """
     return decode_signed_varint(read_varint(self.read))
예제 #4
0
 def read_varint(self):
     """Reads a variable-length encoded unsigned integer from the wrapped
     file.
     """
     return read_varint(self.read)
예제 #5
0
 def read_svarint(self):
     """Reads a variable-length encoded signed integer from the wrapped
     file.
     """
     return decode_signed_varint(read_varint(self.read))
예제 #6
0
 def read_varint(self):
     """Reads a variable-length encoded unsigned integer from the wrapped
     file.
     """
     return read_varint(self.read)