There is a dataset of $N$ elements, each represented by $K$ bits. Now due to hardware limitations to reduce memory for storage, they have to be reprocessed into $K'$ bits each, and $K'<K$. What is the best coding strategy?
"Best" requires you to provide some quality metrics and these are in most cases highly dependent on your specific application.
Generally there are two classes of compression algorithm "lossless" and "lossy". Lossless leverages redundancies in the data and allows full recovery of the original data. Whether this works or not for you, depends on how much redundancy is in the data in the first place and what amount of compression you need.
"lossy" compressor are application specific. Examples are MP3 for audio signals or JPG for pictures. These are trying to minimize the perceptual effects of the data compression. Since audio and visual perception are completely different, so are the algorithms.