Search code examples
javacharacterbitpacking

Packing characters into bits?


I am trying to pack characters into bits in terms of 0's and 1's. I have looked up many websites about bit-packing but I did not get any of them.

I just want a simple idea about bit-packing, and how to do it?

Thanks


Solution

  • A common compression algorithim which has been around a long time is LZW compression.

    It is used by GZIP, PKZIP and JAR to name but a few and is suitable for compressing text. It uses a combination of Huffman encoding, arithmetic coding and a few heuristics to make it more efficient.

    simple idea about bit-packing

    If you find compression and bit packing in general simple, you are a rare breed. ;)