Hello,

I am trying to implement a simple file store based on the SQLite library.
The idea is to use the SQLite as virtual folder. The logic is quite simple
except the following detail:

I need to read the files block by block (with 64k buffer size) and process
each block with the zlib before storing it in the SQLite base. The actual
problem is the blob buffer allocation with sqlite3_bind_zeroblob - I don't
know the real file size after the blocks are compressed so i can not
specify the blob size.
Is there a way to truncate a blob (for example set it size to the file
size before compression and after inserting the compressed data to
truncate the unused blob space)? Or it is possible to change the blob size
"on the fly"?

Any help is very welcome and thank you in advice!


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to