Liver failure is terminal. She was invariably going to die without the transplant. She wanted to receive the donation, her donor wanted to donate. If the success rate for a living transplant is zero that’s one thing, but that’s not being claimed here since she wasn’t eligible for procedural reasons.
In general, this is definitely an area where the best approach is to just find an existing tool for what you need and use that. Especially for text data, compression is a pretty well-studied field and there are plenty of public (and open-source, if that’s a requirement) tools that will do a fantastic job at reducing size. Rolling your own is likely to result in significantly worse compression rates, and if you make an error your data could be irreparably destroyed which you won’t know until you try to access it later.
If your data is incredibly specific you might be able to do better, but it’s usually best to ignore that sort of optimization until you actually need it.