"Richard Hipp" wrote...
On Mon, Feb 11, 2013 at 1:45 PM, jose isaias cabrera wrote:
Greetings.
I have this table,
CREATE TABLE Test (login primary key, password);
and I would like to save zlib data using ubyte[] and also call it back
in.
Are you trying to store zlib-compressed content in the database file, then
read back the original uncompressed content? If so, then I suggest adding
two application-defined functions compress() and decompress():
UPDATE test SET password=compress(password) WHERE login='test';
SELECT decompress(password) FROM test WHERE login='test';
Sample implementations for the compress() and decompress() functions can
be
copied from here:
http://www.fossil-scm.org/fossil/artifact/a59638aa4c0?ln=53-105
The code for registering these application-defined functions with the
SQLite database connection is seen here:
http://www.fossil-scm.org/fossil/artifact/a59638aa4c0?ln=119-122
Dr. Hipp,
have you thought of including these as part of the normal sqlite core
functions?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users