[EMAIL PROTECTED] wrote: > 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! >
Please don't hijack threads on other topics. http://en.wikipedia.org/wiki/Thread_hijacking You can't truncate or resize a blob, but you can replace it with another blob with a different size. Your problem is that you don't know the size of the compressed blob until after you have done the compression (Note truncation may not always work if the compressor actually ends up expanding a previously compressed file). If you can get the compressed size of the file (i.e. by doing a dummy compression with output sent to a null device) you can then set the size of the blob correctly before you start writing to it. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users