On 3/18/18, Olivier Mascia <o...@integral.be> wrote:
>
> Is the serialized format quite compact, or full
> of void unused space on 'pages'? (that obviously a good external compression
> would get rid of). Or said differently, how far or close is the serialized
> format to the on-disk SQLite file format?

The serialization format is exactly the on-disk format.  So you can
write the serialization into a file, then open that file as a
database.  Or you can read a file off of disk into memory then
"deserialize" that blob into a database.

Normally when you open a :memory: database, the pages are spread out
in memory at arbitrary locations.  But with sqlite3_deserialize(),
SQLite keeps all the pages in one contiguous blob.

As for size, I have found that using page_size=512 gives maximum space
efficiency.
-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to