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

Add ability to buffer output of newEncoderFeed and newDecoderFeed #133

Closed
05nelsonm opened this issue Jul 25, 2023 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@05nelsonm
Copy link
Owner

05nelsonm commented Jul 25, 2023

e.g.

val sb = StringBuilder()

Base32.Default.newEncoderFeed(CharBufferOutFeed { buf, len ->
    sb.appendRange(buf, 0, len)
}).use { feed ->
    // ...
}
Base32.Default.newBufferedDecoderFeed(ByteBufferOutFeed(size = 8096) { buf, len ->
    // ...
}).use { feed ->
    // ..
}

Need to think about how this will play with the LineBreakOutFeed

@05nelsonm 05nelsonm added the enhancement New feature or request label Jul 25, 2023
@05nelsonm
Copy link
Owner Author

Closing. Primary reason for utilizing a Feed in the first place is to direct the output to the desired medium (file, http request, etc.). If a buffer is needed with a feed, caller can easily setup their own.

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

No branches or pull requests

1 participant