Skip to content

s2: FR: Toggle compression between blocks #991

@Jille

Description

@Jille

I'd like to toggle uncompressed-mode between blocks when writing with the s2.Writer.

CPU time is expensive in my environment, and I'm compressing a long stream which contains regions of already S2 compressed data. I'd like to tell the s2.Writer to not even bother compressing those blocks to avoid it spending CPU time on compression and then deciding it wasn't worth it.

Ideally without pipeline stalls when having to call Flush() in between, but that might not be worth the complexity on your side. (Requiring AsyncFlush() would be fine however.)

Alternatively I could use two s2.Writers to the same destination, one with compression and one without.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions