BitString Class?

BlitzMax Forums/BlitzMax Programming/BitString Class?

Gabriel(Posted 2007) [#1]
Has anyone written a bitstring class? I'm normally against cramming everything into bits but sometimes, when you're talking about lots of data, it's just impractical to have all these integers lying around. I don't suppose it'll be much trouble to write my own, but I seem to be spending an awful lot of time writing my own versions of everything, so I thought I might see if anyone had already written one.


FlameDuck(Posted 2007) [#2]
Nope sorry. I'm a firm believer in Unicode.


Azathoth(Posted 2007) [#3]
How different is a bitfield to a bitstring? I've been experimenting with a bitfield class that automatically grows.


Vertex(Posted 2007) [#4]
Whats with a extended TStream class? You have the same methods for reading and writing bytes, ints, strings etc. and additional methods like WriteBit and ReadBit. With this stream class you can manage your memory exfficiently as a string. The data can be saved in a datablock with MemAlloc in a Byte Ptr. You can speed up writing processes by define a capacity to reduce memory allocitions(more redundant memory will needed, but a good capacity mechanism reduce this to acceptable).

cu olli