MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / read_index

Function read_index

rat-sql-gap/seq2struct/utils/indexed_file.py:5–14  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

3
4
5def read_index(filename):
6 index = []
7 with open(filename) as index_file:
8 while True:
9 offset = index_file.read(8)
10 if not offset:
11 break
12 offset, = struct.unpack('<Q', offset)
13 index.append(offset)
14 return index
15
16
17class IndexedFileWriter(object):

Callers 1

__init__Method · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected