I don't think there are any problems with having a raw prefix, and just
wrapping GZipInputStream around the raw input stream after it's been read,
but that sounds pretty messy. It seems easier to just make the whole thing a
gzip stream - it can then also be easily read by other tools that use zlib.

On Tue, Mar 8, 2011 at 8:09 PM, ksamdev <samvel.khalat...@gmail.com> wrote:

> Cool, it worked great.
>
> Can I mix Raw out and Gzip out in the file?
>
> Say, I'd like to write a raw number (4 bytes) at the beginning of the file
> and then add the message through the Gzip stream. Visually, my file would
> look like:
>
> RRRRGGGGGGGGGGGGGGGGGGGG.....
>
> where first RRRR - 4 bytes written with raw_out and the rest:
> GGGGGGGGGGGGGG.... - with Gzip Stream.
>
> Of course, the reading sequence would be:
>
> 1. read RRRR
> 2. keep reading the rest GGGGGGGGG.... through Gzip Stream.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@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