Reverting the patch is not an option, since it is much more than a few lines, and it messes with SQLite3 VM opcodes, so it will induce a lot of potential errors.

Perhaps a dedicated VFS may be the solution - this is the path chosen by https://github.com/utelle/SQLite3MultipleCiphers for instance.
But a VFS is a lot of work, error prone, and performance may also decrease.
If we go this VFS path, we may add a compression feature, too...

Any feedback is welcome!
If anyone has an idea...

Edit/Update: We have implemented a solution based on VFS.
Please see https://synopse.info/forum/viewtopic.php?pid=32327#p32327