Serialization and data compression methods

B

Bob Hairgrove

Are data compression methods used as the serialization technique?

There is no "the serialization technique" ... there are many ways of
implementing serialization. There are also many methods of data
compression.

What is it exactly that you want to do? And what does it have to do
with the C++ language?
 
M

Mike Wahler

Alex Vinokur said:
Are data compression methods used as the serialization technique?

They are used as one possible serialization method
by some applications, those that need it. Other
applications use some other technique, depending
upon their needs. E.g. If I serialize some text
for purposes of transmitting to a printer, I certainly
don't want to compress or 'encrypt' it.

This isn't really a C++ question, but a design question,
perhaps better addressed in e.g. comp.programming

-Mike
 
T

Thomas Matthews

Alex said:
Are data compression methods used as the serialization technique?

Yes and no.
When data objects are big, or transmission time is costly, then
data compression is applied. When 1200 Baud modems were the norm,
everything was compressed to save transmission time.

It is a time-memory trade off. You are trading memory size for
compress and uncompress time. Only you and the users of your
application can judge which is more important.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
T

Thomas Matthews

Alex said:
To transmit objects we should put them on a disk.
To do that it seems that we should encode them.

You only need to encode data if the data is sensitive
and should only be seen by certain eyes. See also
"cryptography."

Many applications have been writing objects to the
disk, tape, punched tape, etc., for many decades
without encoding them.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
J

Jeff Flinn

Alex said:
Are data compression methods used as the serialization technique

Not 'as' but 'with'. See the boost.serialization library and the upcoming
boost.iostream library by Jonathan Turkanis. The serialization library is
independent of stream type, and the iostream library provides the ability to
easily create compressed streams.

Jeff Flinn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top