Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi Monks,
I build a Search engine which use an inverted index. For small number of documents is quiet fast but not for large ... 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! Mimis In reply to Compress positive integers by MimisIVI
|
|