For a genetic algorithm application, I\'m using a whole load of binary strings. Most of the time they literally take the form of 01001010110, so that they can b
Or implement Run length encoding or Huffman coding. Both are fairly easy to implement. RLE is by far the easiest, but will in most cases have worse compression ratio. If your data typically has many consecutive characters of the same value, it could still provide a substantial improvement.