Curio Studio

The Home of GreatNews
It is currently Tue Sep 02, 2014 11:39 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: description
PostPosted: Tue May 05, 2009 2:09 pm 
Offline

Joined: Thu Dec 20, 2007 2:45 pm
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: description
PostPosted: Tue May 05, 2009 3:11 pm 
Offline

Joined: Tue Feb 21, 2006 1:56 pm
Posts: 137
Location: Tyneside, UK
Are you wanting the SQL string?

_________________
Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net


Top
 Profile  
 
 Post subject: Re: description
PostPosted: Tue May 05, 2009 3:22 pm 
Offline

Joined: Thu Dec 20, 2007 2:45 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject: Re: description
PostPosted: Tue May 05, 2009 3:25 pm 
Offline

Joined: Tue Feb 21, 2006 1:56 pm
Posts: 137
Location: Tyneside, UK
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

_________________
Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group