I mean: if I use Java's GzipOutputStream and then read compressed data using
C++'s GzipInputStream, will it work?

In other words, are generated streams pure Gzip compliant, in the sense
there are no special headers. Could I use unix gzip to unzip a file which
its content was generated by Java or C++ GzipOutputStream?

Sounds like the answer is yes. Just wanted to confirm that.

On Tue, Oct 19, 2010 at 6:02 PM, Marc Gravell <marc.grav...@gmail.com>wrote:

> In terms of output? GZIP / DEFLATE / etc implementations should be
> interoperable between platforms, yes. However IIRC the compressed stream is
> not guaranteed to be byte-identical between specific implementations (but
> the *decompressed* stream should be byte-identical)
>
> Marc
>
> On 19 October 2010 20:24, Igor Gatis <igorga...@gmail.com> wrote:
>
>> Are C++ and Java GZip streams compatible?
>>
>>
>> On Tue, Oct 19, 2010 at 4:34 PM, Kenton Varda <ken...@google.com> wrote:
>>
>>> Compression is not a built-in feature of protocol buffers, but it is easy
>>> and often useful to apply compression on top of the protobuf encoding.
>>>
>>> In Java, write your data to a GZIPOoutputStream, and then read from a
>>> GZIPInputStream.  These classes are part of the standard Java library, not
>>> the protobuf library.
>>>
>>> In C++, use the GzipOutputStream and GzipInputStream classes that are
>>> provided in the protobuf library (under google/protobuf/io).  These simply
>>> call zlib to apply compression on top of protocol buffers.
>>>
>>> On Mon, Oct 18, 2010 at 9:50 PM, nit <nithin.shubhan...@gmail.com>wrote:
>>>
>>>> HI All,
>>>>  Can anyone let me know whether the encoded file can be compressed
>>>> while sending it and decompressed at the receiver's end?
>>>>   The problem is like i have a message structure which has many field
>>>> and consumes more bytes. So can i compress and Decompress them?
>>>>
>>>> thanks,
>>>> Nithin Shubhananda
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Protocol Buffers" group.
>>>> To post to this group, send email to proto...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/protobuf?hl=en.
>>>>
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Protocol Buffers" group.
>>> To post to this group, send email to proto...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/protobuf?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To post to this group, send email to proto...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/protobuf?hl=en.
>>
>
>
>
> --
> Regards,
>
> Marc
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to