Mercurial > hg > cc > cirrus_work
changeset 316:6c04c30c95d0 trim
shrink working, probably, can we recover the data from it?
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Fri, 09 Jan 2026 22:31:17 +0000 |
| parents | 6c586bee6a50 |
| children | 9450b557ccac |
| files | lib/python/cc/lmh/shrink.py |
| diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/python/cc/lmh/shrink.py Tue Dec 23 20:08:26 2025 +0000 +++ b/lib/python/cc/lmh/shrink.py Fri Jan 09 22:31:17 2026 +0000 @@ -16,7 +16,9 @@ with open(ifn,'rb') as f, open(ofn,'wb') as of: for l in f: - #of.write(l) + if l == b'\n': + of.write(l) + break (bb,od,oe) = l.rstrip().split(b':',2) (os1,os2)=bb[1:].split(b',') kl=int(os1) @@ -45,5 +47,3 @@ else: of.write(int.to_bytes(nli,4)) of.write(b'\n') - -
