Store the pattern, not the bytes.

TetracubeDB keeps a rule + residual (the seed), not the raw file. Where the data has structure the seed is tiny and the file rebuilds bit-for-bit, proven by hash. Where it does not, it saves nothing. Pick one:
Always lossless: worst case the seed carries the whole residual, so nothing is ever lost, only the size win changes with how much structure is present. The capsule carries the file's type, name, byte count, and hash for integrity. The method that finds the rule is held privately; this shows what it does, not how.