I want to compress a string of bits, after which I want to unpack it. Can any body help me, mentioning the method of fast lossless compression and decompression and, if possible, compared with the implementation of programming.
If you are looking for speed, then using a fast compression algorithm such as LZ4 makes sense. Such an algorithm is an order of magnitude faster than zlib / gzip (for example, 10 times faster). http://code.google.com/p/lz4/
How about forever green gzip or bzip2 ? They come already as a library, ready for use.
Gzip?
The algorithm can be found here:
http://www.gzip.org/algorithm.txt
Bonus: compatibility with almost everything.
According to Matt Mahowey, “Big Benchmark Compression Text” ( http://mattmahoney.net/dc/text.html ) there are some very fast decompressors with a good compression ratio: