Typically, you can compress data that has some predictability or redundancy. Dictionary-based compression (for example, ZIP-style algorithms) traditionally does not work on small pieces of data due to the need to share the selected dictionary.
In the past, when I compressed very small pieces of data with somewhat predictable patterns, I used SharpZipLib with a custom Dictionary. Instead of embedding the dictionary in the actual data, I hard-coded the dictionary in every program that should (de) compress the data. SharpZipLib provides you with both options: a custom dictionary and keeps the dictionary separate from the data.
Again, this will only work if you can predict some patterns of your data in advance so that you can create an appropriate compression dictionary, and the dictionary itself can be separated from the compressed data.
source share