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

CompressingReader: compressed data reader stream (#210) #211

Merged
merged 4 commits into from
Dec 8, 2023

Commits on Nov 13, 2023

  1. CompressingReader: compressed data reader stream (pierrec#210)

    In Go, `http.Request` requires an `io.ReadCloser` for an upload body. To
    facilitate compression of data being uploaded we want to wrap a
    source reader (such an `io.File`) with a proposed
    `lz4.CompressingReader`, whereupon the said reader can be set directly
    into `http.Request` Body field.
    
    This benefits not only the plain `http.Request`, but also the various
    network file storage APIs which build on top of Go's http client.
    
    Signed-off-by: Alex Dubov <[email protected]>
    oakad committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    65348f5 View commit details
    Browse the repository at this point in the history
  2. CompressingReader: make sure to clear out buffer

    Out buffer may have some stale overflow data on Reset.
    
    Signed-off-by: Alex Dubov <[email protected]>
    oakad committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    f2ece5b View commit details
    Browse the repository at this point in the history
  3. CompressingReader: account for possible out buffer state

    It is possible for out buffer to have no overflow data and yet
    the read offset will be not zero (if byte slices passed by the reader
    just happened to align perfectly).
    
    Signed-off-by: Alex Dubov <[email protected]>
    oakad committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    4a80a2f View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2023

  1. CompressingReader: support older Go versions

    Signed-off-by: Alex Dubov <[email protected]>
    oakad committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    7613989 View commit details
    Browse the repository at this point in the history