Re: Allow setting compression level on GzipOutputStream
Yeah, the test only compares "default compression" to "no compression" -- even with the small message, default compression manages to compress a little bit. Committed as rev 170. On Fri, Jul 31, 2009 at 5:08 PM, wrote: > On 2009/07/31 23:56:40, kenton wrote: > > This looks great, Kenton. Thanks for cleaning it up! The tests look > pretty decent as well. With such a small golden message you're probably > not going to see any difference between the different compression > levels, and it is just passed through to zlib so there's probably no > point in testing it here. > > > > http://codereview.appspot.com/96211 > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Allow setting compression level on GzipOutputStream
On 2009/07/31 23:56:40, kenton wrote: This looks great, Kenton. Thanks for cleaning it up! The tests look pretty decent as well. With such a small golden message you're probably not going to see any difference between the different compression levels, and it is just passed through to zlib so there's probably no point in testing it here. http://codereview.appspot.com/96211 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Allow setting compression level on GzipOutputStream
Reviewers: peter.keen_gmail.com, Description: Hi Peter, I decided to extend this patch a bit. I didn't like all the default options to the constructor, so I created a separate Options struct -- this way people don't have to set a buffer size in order to set compression level (which is good because almost no one should care about buffer size). I also added tests. At Google we have a policy of reviewing all code before submission, so please take a look at the diffs and let me know if it looks good to you. Please review this at http://codereview.appspot.com/96211 Affected files: M src/google/protobuf/io/gzip_stream.cc M src/google/protobuf/io/gzip_stream.h M src/google/protobuf/io/zero_copy_stream_unittest.cc --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---