Skip to content

Commit

Permalink
special case md5 prefixes, for prefetch
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Jun 13, 2021
1 parent b57b2b3 commit e205e64
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sourmash/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,15 @@ def yield_fp():
print(f"({p} found!")
yield self.zf.open(zipinfo)
break
elif picklist and picklist.coltype == 'md5prefix8':
def yield_fp():
for zipinfo in self.zf.infolist():
if zipinfo.filename.startswith('signatures/'):
fn = zipinfo.filename[len('signatures/'):]
prefix = fn[:8]
if prefix in picklist.pickset:
print(f"({prefix} q found)")
yield self.zf.open(zipinfo)
else:
def yield_fp():
for zipinfo in self.zf.infolist():
Expand Down

0 comments on commit e205e64

Please sign in to comment.