mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Mahler" <benjamin.mah...@gmail.com>
Subject Re: Review Request: Adding gzip compression in stout.
Date Fri, 26 Oct 2012 18:35:20 GMT


> On Oct. 26, 2012, 5:17 p.m., Vinod Kone wrote:
> > third_party/libprocess/include/stout/gzip.hpp, line 25
> > <https://reviews.apache.org/r/7675/diff/2/?file=180203#file180203line25>
> >
> >     why -1 in braces?

This is showing what the zlib #defines are.
I believe they use (-1) to prevent programming errors (without the parens, some expressions
would be valid, like "0 Z_DEFAULT_COMPRESSION" would become "0 -1".


> On Oct. 26, 2012, 5:17 p.m., Vinod Kone wrote:
> > third_party/libprocess/include/stout/gzip.hpp, line 15
> > <https://reviews.apache.org/r/7675/diff/2/?file=180203#file180203line15>
> >
> >     newline

We don't require double newline at the start of namespaces, or am I mistaken?


> On Oct. 26, 2012, 5:17 p.m., Vinod Kone wrote:
> > third_party/libprocess/include/stout/gzip.hpp, line 39
> > <https://reviews.apache.org/r/7675/diff/2/?file=180203#file180203line39>
> >
> >     why do you need level == Z_DEFAULT_COMPRESSION check here? doesn't the later
statement subsume this?

Nope, see my comment to benh.

You might think Z_DEFAULT_COMPRESSION would be within [Z_NO_COMPRESSION, Z_BEST_COMPRESSION]
but alas, it's not. They use -1 as the magic default value.


- Ben


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7675/#review12825
-----------------------------------------------------------


On Oct. 25, 2012, 9:20 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7675/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2012, 9:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> Currently only providing in memory string compression / decompression utilities.
> 
> The zlib API is pretty rough, but I've managed to grok it.
> 
> 
> Diffs
> -----
> 
>   src/tests/stout_tests.cpp dcf605c7231eb6b5fdbfbbb9986a44546ba451a8 
>   third_party/libprocess/Makefile.am 082541bce3f4a1117e265ce8cc29dc64a15b9ae2 
>   third_party/libprocess/include/stout/gzip.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/7675/diff/
> 
> 
> Testing
> -------
> 
> Added some gzip tests.
> 
> OSX + CentOS: make check
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message