|go ahead... be a heretic|
Compress positive integersby MimisIVI (Acolyte)
|on Apr 07, 2008 at 22:39 UTC||Need Help??|
MimisIVI has asked for the wisdom of the Perl Monks concerning the following question:
I build a Search engine which use an inverted index.
For small number of documents is quiet fast but not for
The solution is to compress the data that i am saving in
the index but i have problem to understand the two most
helpfull Perl's functions (pack and unpack)...
The are a lot of compression techiques, like Elias delta
code, Golomb code, e.t.c.
I made a reasearch for Perl code in the net but with
no any luck. I found this code in C++ which simply encode and
decode positive integers by use the byte alligned compression techique..
In each case, n postings are processed. Uncompressed
postings are stored in the integer array uncompressed,
compressed postings in the byte array compressed.
Unfortunately my knowledge is very low in C++ and i
need your help to translate this code in Perl!!!
If anyone knows any other compression techniques (except of the Huffman because its too complex for me..) for
possitive integers will be huge help for me too...
Thanks in Advance!