Skip to content

feat(util-stream): buffering of stream chunks #1523

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

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Feb 13, 2025

add createBufferedReadable fn to util-stream to wrap Readable and ReadableStream, buffering chunks to a configurable minimum byte length.

@kuhe kuhe requested a review from a team as a code owner February 13, 2025 18:10
@kuhe kuhe force-pushed the feat/buffered-stream branch 3 times, most recently from 77dc7a5 to 2e4eca4 Compare February 13, 2025 18:27
@kuhe kuhe changed the title feat(util-stream): enable buffering of stream chunks feat(util-stream): buffering of stream chunks Feb 13, 2025
@kuhe
Copy link
Contributor Author

kuhe commented Feb 13, 2025

this PR will be used to address aws/aws-sdk-js-v3#6859

@kuhe kuhe force-pushed the feat/buffered-stream branch from 2e4eca4 to 6ce0a5d Compare February 13, 2025 18:41
this.byteLength += byteArray.byteLength;
}

public flush() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will flush() always create a new aggregate buffer, even if there's only one chunk?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to return single bytearray without copy

@kuhe kuhe force-pushed the feat/buffered-stream branch from 6ce0a5d to d52a338 Compare February 13, 2025 18:59
@kuhe kuhe merged commit d1d1f72 into smithy-lang:main Feb 14, 2025
10 checks passed
@kuhe kuhe deleted the feat/buffered-stream branch February 14, 2025 15:25
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.

2 participants