Skip to content

Initial buffer size #30

@joto

Description

@joto

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions