I have looked at the SharpZipLib library, but i do not know how i would use the LZW in that library.
For example i have a List<int> of bits, which i want to compress.
Lets say List<int> bits contains the following elements {1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,1,1,1}
How could i compress this using LZW SharpZipLib or any other LZW library.
I have tried looking at the documentation and ICSharpCode.SharpZipLib.Lzw, but i haven't found anything that would help me compress the List<int> above.
SharpZibLib only allows decompressing LZW from a particular format, namely the Z file format.
See the Stack Overflow question LZW Data Compression for code to compress data using LZW. As for your data, I'd suggest packing those bits into bytes, create a byte array from a BitArray, then a MemoryStream over that byte array.
So something like this: