Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s2: Add AsyncFlush method: Complete the block without flushing #927

Merged
merged 2 commits into from
Feb 12, 2024

Commits on Feb 9, 2024

  1. s2: Add AsyncFlush method: Complete the block without flushing

    My use case is to transfer a large compressed S2 stream with a few
    changes very often. To get a small diff I want to end blocks at
    application decided points rather than at byte offsets. This allows me
    to remove the first byte without every single block changing.
    
    Flush() works for this, but it limits concurrency because it waits for
    the last block to be compressed rather than allowing that
    asynchronously.
    
    So I'd like to propose AsyncFlush, which flushes the buffer to a block,
    but doesn't flush the block to the io.Writer.
    
    There were actually a few places in the s2 code that also wanted to end
    the block, but didn't necessary want to flush to the writer.
    Jille committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    2c36775 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2024

  1. Update s2/writer.go

    Co-authored-by: Klaus Post <klauspost@gmail.com>
    Jille and klauspost authored Feb 11, 2024
    Configuration menu
    Copy the full SHA
    09a048f View commit details
    Browse the repository at this point in the history