powturbo / TurboPFor-Integer-Compression

Fastest Integer Compression
GNU General Public License v2.0
766 stars 113 forks source link

Ruby Port and some beginner questions #4

Closed rrphotosoft closed 9 years ago

rrphotosoft commented 9 years ago

Hi, Congratulations on building this library. I currently use Lemire's FastPfor, and after reading the information on your page I decided to try it out, since Lemire's FastPFor does not offer integer intersection out of the box.

1.I am in the process of building a ruby port for Lemire's fastpfor library and I want to build one for your library also, hence I would really like if you can give me few details like which headers should be included, and which functions need to be referenced. (While building a ruby port I need to make one c file which specifies a single function which is called from Ruby. That function must then do all the interaction with your library. - so for eg, If i pass in a list of integers from ruby, then which function should I call from your library to compress and inversely which function to decompress). 2.Is it possible to use redis as a storage medium?

Many thanks, RRPhotosoft.

powturbo commented 9 years ago

Glad you have interest in TurboPFor. Well, there are only low level functions with usage similar to memcpy. You must provide an input and output buffer at the calls to the functions. The output buffer must be large enough to contain the compressed stream. See icbench for the usage. For the bitpacking functions you must first determine (in the current version) the bitsize before calling the functions.You can look at the java interface to see how the functions are accessed from another language.