Hi tachyon..,

Actually yes, this is what i want to do..but i dont have the pack/unpack knowledge to do it...If we will forget the compress methods that i said can you give an example how to implement this posting lists structure??

About the positions that i save in my application..
For example if i have this text:
"You can do what ever you want,if you dont think you cant"
The positions of the word "you" are 1,6,9,12

I implement the GAmma and the Byte allign codes in perl and i have to say that the Gamma gives very compression results for the doc ids..because i dont save the real doc id for each document but the relevance diferences..

for example:
Original Posting List only with doc ids:
Post: 1 4 5 7 ....
The diferences:
Post: 1 3(4-1) 1(5-4) 2(7-5) .... i keep only for the first doc id the original id
Actually i use the same method with the diferences for the positions too..

So for a term which has very high DF (which is my botleneck) the diferences are very small(average 2) and with Gamma code i use only 3 bits!!! The problem is that the decoding is very complex (as BrowserUK said too)and i dont know how to import efficient positions for each docid......i am using the substr function to read each bit from the bit string which i dont know if it is the most efficient way..

About the byte allign as i wrote in another thread is not so compressed as Gamma but the decoding is very simple ...
I just tried to figure out if it is worth the decoding time for these methods...but i really want to try your proposal...if you can help me...

Thanks again Guys..

In reply to Re^9: Compress positive integers by MimisIVI
in thread Compress positive integers by MimisIVI

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.