When compressing the initial output buffer is sized as size / 2 + 1024 (https://github.com/mapbox/gzip-hpp/blob/master/include/gzip/compress.hpp#L81). Where is this formula coming from? Is it optimal?
Looking at the real-world tiles in the mvt-fixtures, compressed tiles are (on average) larger than half the size of the uncompressed tiles. So this means we'll go around the loop twice, doing extra work.
Maybe this should be configurable, because only the calling code knows what data it has and what the compression ratio might be?
When compressing the initial output buffer is sized as
size / 2 + 1024(https://github.com/mapbox/gzip-hpp/blob/master/include/gzip/compress.hpp#L81). Where is this formula coming from? Is it optimal?Looking at the real-world tiles in the mvt-fixtures, compressed tiles are (on average) larger than half the size of the uncompressed tiles. So this means we'll go around the loop twice, doing extra work.
Maybe this should be configurable, because only the calling code knows what data it has and what the compression ratio might be?