P
P
pixik2015-09-29 12:35:09
C++ / C#
pixik, 2015-09-29 12:35:09

Is there a library in C++ that allows you to somehow quickly compress an array of binary data before passing it through any interface?

Good afternoon!
I transfer data over the serial port, is there any way to compress the data array before transmission (it is desirable that it be as fast as possible), and decompress them on the receiving side in order to load the processor instead of expanding the stream?
In pseudocode, something like this:

//На серверной стороне:
byte[] arr = getData();
byte[] zip_arr = zipData(arr);
sendData(zip_arr);
....
// На стороне клиента:
byte[] rec_zipped = receiveData();
byte[] unzip_arr = unzipData(rec_zipped);
...

the program is written under linux, maybe there are some built-in libraries?
Thanks everyone!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-09-29
@pixik

pixik : There are no built-in ones in the standard library, but there are third-party libraries. But it is quickly enough searched in Google, for example, LZMA is, APlib is, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question