You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Anand Hegde <an...@gmail.com> on 2012/06/13 07:15:43 UTC

Compression on serialization

I serialized a 116k file to thrift binary format using the compact protocol
but even after serializing, the size is 116K. Isnt the serializer supposed
to reduce the file size? The file contains only strings, if that info
helps.

Re: Compression on serialization

Posted by Anand Hegde <an...@gmail.com>.
Thanks for the quick reply.

RE: Compression on serialization

Posted by Mark Slee <ms...@fb.com>.
The compact protocol doesn't do compression, the word compact refers to the way it encodes structure and type metadata.

Thrift is intended for strongly-typed structured data serialization, not compression. A file is already serialized - it sounds like what you really want is to compress serialized data. Would recommend using zlib or gzip for that.
________________________________________
From: Anand Hegde [anandghegde@gmail.com]
Sent: Tuesday, June 12, 2012 10:15 PM
To: user@thrift.apache.org
Subject: Compression on serialization

I serialized a 116k file to thrift binary format using the compact protocol
but even after serializing, the size is 116K. Isnt the serializer supposed
to reduce the file size? The file contains only strings, if that info
helps.