Skip to content

fix: extra byte read from chunk transfer #1294

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

xinsong-cui
Copy link
Contributor

@xinsong-cui xinsong-cui commented Jun 9, 2025

Issue #

Description of changes

Adds a public property contentBytesTransferred to track the content bytes transferred, excluding chunk metadata (need to opt in internal api to access).
This allows monitor file transfer progress without counting the overhead bytes from chunk encoding.

example usage:

override fun read(sink: SdkBuffer, limit: Long): Long = delegate.read(sink, limit).also {
    if (it > 0L) {
        val bytesTransferred = chunkedSource?.contentBytesTransferred ?: it
    }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This comment has been minimized.

This comment has been minimized.

@xinsong-cui xinsong-cui marked this pull request as ready for review June 9, 2025 17:35
@xinsong-cui xinsong-cui requested a review from a team as a code owner June 9, 2025 17:35

This comment has been minimized.

Copy link

github-actions bot commented Jun 9, 2025

Affected Artifacts

Changed in size
Artifact Pull Request (bytes) Latest Release (bytes) Delta (bytes) Delta (percentage)
aws-signing-common-jvm.jar 72,447 71,836 611 0.85%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant