Consolidated MeltMind design decisions, S1 result review and Drive index; stdlib-only ZIP range-read census (624 logs) with SHA256SUMS. Review material only; not for main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.1 KiB
Python
23 lines
1.1 KiB
Python
import sys,struct,collections
|
|
b=open(sys.argv[1],'rb').read(); total=32757812726; off=32757550824
|
|
p=len(b)-(total-off); ents=[]
|
|
while b[p:p+4]==b'PK\x01\x02':
|
|
csz,usz=struct.unpack('<II',b[p+20:p+28]); nl,el,cl=struct.unpack('<HHH',b[p+28:p+34]); lo=struct.unpack('<I',b[p+42:p+46])[0]
|
|
name=b[p+46:p+46+nl].decode(); ex=b[p+46+nl:p+46+nl+el]; q=0
|
|
while q<len(ex):
|
|
hid,hs=struct.unpack('<HH',ex[q:q+4])
|
|
if hid==1:
|
|
v=ex[q+4:q+4+hs];k=0
|
|
if usz==0xFFFFFFFF: usz=struct.unpack('<Q',v[k:k+8])[0];k+=8
|
|
if csz==0xFFFFFFFF: csz=struct.unpack('<Q',v[k:k+8])[0];k+=8
|
|
if lo==0xFFFFFFFF: lo=struct.unpack('<Q',v[k:k+8])[0];k+=8
|
|
q+=4+hs
|
|
ents.append((name,usz,csz,lo)); p+=46+nl+el+cl
|
|
v=[e for e in ents if e[0].endswith('.vtu')]
|
|
h=collections.Counter(e[0].split('_')[1] for e in v)
|
|
print('unique ABC hashes',len(h),'max parts per hash',max(h.values()),'hashes with >1',sum(1 for c in h.values() if c>1),'files in multi',sum(c for c in h.values() if c>1))
|
|
for e in ents:
|
|
if e[0].endswith('.log') or e[0].endswith('.yml'):
|
|
print(e);
|
|
if e[0].endswith('.yml'): break
|