Subject | RE: [firebird-support] BLOB Filter |
---|---|
Author | Pierre Y. |
Post date | 2004-05-21T12:17:26Z |
> > Is there some sample of compiled BLOB filters ?Cool. Do you (or others) have some delphi example or compiled versions of
> > Can I write one with Delphi ?
>
> Sure, it is just DLL library.
sample filter (example api9*.* in examples directory of firebird source
distribution)
> > What happens when I store datas to the database ? Is the filter usedSo I'll have to modify blob accès into UIB components :-)
> > automatically by the engine since it has been declared ?
>
> No, you have to explicitely ask the server to use the filter.
> (by supplying appropriate Blob Parameter Block to isc_open_blob2()
> or isc_create_blob2() functions)
> > Imagine I wouldOK. Let me write something like an algorithm. Tell me if I understood how
> > like to use a "zip" filter for text blobs. Wich type of blob should I
> > declare for the field in my table ?
>
> Pick any negative number you wish (between -32k and -1)
this will work.
1) Create table mytable(my_id integer, my_blob blob sub type -17);
2) insert into mytable(1,?) setting appropriate BPB to isc_create_blob2
passing as blob datas my "uncompressed datas". Firebird will call the filter
to store compressed datas into the blob page ?
3) To read the blob I've to tell Firebird I want to read sub type 1 blob
instead of sub type 17 and it will call the filter to uncompress blob datas
before send them to me ?
Thank you very much, regards
Pierre Y.