Click here to Skip to main content
15,501,016 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Where is the best place to start working with data compression in c++.I want to compress data on
two endpoints on one endpoint i want to compress data and on other i want decompress.
Please help me.
enhzflep 22-Mar-13 0:21am     CRLF
zlib Wrapping the c functions into your own class is a solution I've used in the past.

There are two things here, working with data compression and working with C++.

To crack data compression you'll nee to understand the mathematics and algorithms at least reasonably well from a theoretical point of view, in other words on paper. A quick search tells me I might start somewhere like here[^].

Assuming you've nailed data compression theory the next part is C++. You'll need data structures and I/O that match the kind of data you're working with, and in particular the ammount of data you're working with. Compressing a single JPEG image into the smallest possible space using tens of billions of cycles to do fractal compression is a very different ball game from compressing live HD video in real time, i.e 30+ frames per second.

Given that you're not likely to want to do everything from scratch the first time you might look into some exisitng frameworks like ACE for high speed comms or GStreamer or Microsoft Media Foundation for building a video pipeline and then add your compression/decompression as a new plugin or layer.

The rest is going to be down to practised C++ technique and the details of your specification. I wish you luck.
Share this answer
enhzflep 22-Mar-13 0:21am     CRLF
<message removed=""> Oops! Intended for op.
I used this one for my C++ projects:
Zip Utils - clean, elegant, simple, C++/Win32[^]

Share this answer
Alamgirable 21-Mar-13 11:02am    
Is it possible to compress data by working with binaries?
Saurabh.Garg 21-Mar-13 11:07am     CRLF
What do you mean by binaries? Do you want a compiled library and just use it? The project I linked contains two files only: one for compressing and one for uncompressing. -Saurabh

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900