BitString Class?
BlitzMax Forums/BlitzMax Programming/BitString Class?
| ||
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. |
| ||
Nope sorry. I'm a firm believer in Unicode. |
| ||
How different is a bitfield to a bitstring? I've been experimenting with a bitfield class that automatically grows. |
| ||
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 |