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>
17 lines
736 B
Python
17 lines
736 B
Python
import sys,struct
|
|
b=open(sys.argv[1],'rb').read(); total=32757812726; off=32757550824
|
|
p=len(b)-(total-off)
|
|
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: 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
|
|
if name.endswith('.log'): print(name, lo, lo+30+nl+el+csz+200)
|
|
p+=46+nl+el+cl
|