Page 1 of 1

description

Posted: Tue May 05, 2009 2:09 pm
by JimmyBear
Hi Jack,

Could you explain how you populate news_item.description field?
I know it's a BLOB and the data is compressed before inserting in some way.
I remember you mention this in the forum somewhere but I just can't find it.
I'm using php and trying to populate it with only contents I cared about.
Thank you!

Jimmy

Re: description

Posted: Tue May 05, 2009 3:11 pm
by MysteryFCM
Are you wanting the SQL string?

Re: description

Posted: Tue May 05, 2009 3:22 pm
by JimmyBear
MysteryFCM wrote:Are you wanting the SQL string?

No, I want to know the method of compression.

For example, if the content of the description is TESTING.
the description field in the database is a BLOB binary which will look something like this:

2C 00 00 00 00 00 00 AE 1B 37 25 D2

I need to know what method is used to compress the string 'TESTING' into '2C 00 00 00 00 00 00 AE 1B 37 25 D2'
(Of course I just made up that string, otherwise I won't be asking this question.)
I know the first couple of bytes are probably length.

I also know all the data are stored in utf8 in other columns
so if a feed is not UTF8 encoded, I assume it'll have to convert to UTF8 then do the compression before inserting to the description field.

Thanks again.

Re: description

Posted: Tue May 05, 2009 3:25 pm
by MysteryFCM
I don't have access to the GN source, so can only speculate that it's likely something along the lines of;

http://www.codeproject.com/KB/database/ ... press.aspx