#1 2018-01-17 10:38:35

enrcas
Member
Registered: 2013-06-16
Posts: 20

SQLite Compression

I've seen other solutions for on-the-fly sqlite compression.
As i seen mORMot supports encryption, maybe is easy to implement this in the code?

I know there is very fast compression/decompression libraries out there, lz4 for example.

Any ideas about this?. Sorry, if my question is dumb, i am just a coder doing little personal projects in Delphi/mORMot.

Thanks AB for such a great work!

Offline

#2 2018-01-17 12:49:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: SQLite Compression

There is no built-in compression yet at SQlite3 file level.
It is a good idea, but we didn't use it yet, since if we need small compressed files, we usually use the TSQLRestStorageInMemory class with binary persistence, at ORM level, which gives very good results.
For compressing, our SynLZ algorithm, or the newly introduced SynLizard unit could be used - since they usually outperforms LZ4 or Snappy, depending on the content.

Any input is welcome!

Offline

#3 2018-01-17 20:21:17

enrcas
Member
Registered: 2013-06-16
Posts: 20

Re: SQLite Compression

Excuse my ignorance, this need to be implemented at level source in sqlite? Or could be implemented in synopse?

Offline

#4 2018-01-17 20:28:14

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: SQLite Compression

You need to implement a VFS for SQlite3, in pascal, since compression is not part of SQlite3 open source version.
See https://www.hwaci.com/sw/sqlite/zipvfs.html - it costs $4000.

Offline

#5 2018-01-20 10:24:51

enrcas
Member
Registered: 2013-06-16
Posts: 20

Re: SQLite Compression

Yes, i've seen that. Ok, then it's much more complex than I thought.
Thanks!

Offline

Board footer

Powered by FluxBB