I understand that data on computers can be compressed (I see it all the time with zip files and jpegs) but I was wondering just how compression works. Thinking it through, if you data is represented by 1s and 0s then it can be corresponded 1 to 1 with a binary number (albeit a large one). The idea behind compression is that some smaller number can represent the same data, but how is this possible since that new number must represent something else? I suppose if you know in advance that this number is a compressed version of another number than you can interpret it differently? Are there any relatively simple compression algorithms?
Labdabeta 182 Posting Pro in Training Featured Poster
Recommended Answers
Jump to Post>>I am storing many variables of different types.
Can you convert/encode all those variables to a string version?
Jump to PostI think it will be easier if you try to compress a series of bytes into a smaller chunk instead of trying to compress a byte into something smaller. I suggest to read
Jump to PostRun length encoding is simple, but it may not be suitable for your type of data. But it may work if you can deal with your data as a continuous string of ones and zeros and then compress the ones and zeros. After you uncompress the continuous string of ones …
All 9 Replies
L7Sqr 227 Practically a Master Poster
Labdabeta 182 Posting Pro in Training Featured Poster
Tumlee 42 Junior Poster in Training
mrnutty 761 Senior Poster
Labdabeta 182 Posting Pro in Training Featured Poster
mrnutty 761 Senior Poster
MandrewP 60 Junior Poster in Training
MandrewP 60 Junior Poster in Training
Labdabeta 182 Posting Pro in Training Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.