Hi Joe/Daniel, Looking at your responses I realised that i can pack a bunch of 2 bit objects into a single integer just as i would using a char array in C. Don't know why I didn't realise this before.
So umm i guess that solves that problem. For those still interested in my purpose I have hundreds of megs of data in character sequences but there are only 4 possible characters - thus I could represent them in 2 bits of binary data rather than 8 in text form, along with all the benefits that brings (space/time). Thanks for your inputs. Vlad. On Fri, May 28, 2010 at 5:36 AM, Joe Groff <[email protected]> wrote: > On Thu, May 27, 2010 at 6:18 AM, Vladimir Darmanian > <[email protected]> wrote: > > Hi there, > > > > - how do you work with 2bits of data only? I looked at bit-arrays but > they > > use an integer in the backend which defeats the purpose. > > You'll need to be more specific about your goal. Are you going for > space efficiency or time efficiency? How exactly does a bit-array > being backed by integers defeat your purpose? Do you have many two-bit > data objects or just one? > > -Joe > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk >
------------------------------------------------------------------------------
_______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
