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

Filter pipeline improvements #33

Closed
Apollo3zehn opened this issue Jun 26, 2023 · 0 comments
Closed

Filter pipeline improvements #33

Apollo3zehn opened this issue Jun 26, 2023 · 0 comments

Comments

@Apollo3zehn
Copy link
Owner

1.) Filters like deflate do not know uncompressed size. But if they are the last filter in the pipeline, the size is known by the chunk size.

Also if is the second last filter, the following filter might be shuffle which does not change buffer size. So for deflate it is always better to use the chunk size as guess than to use the input buffer size.

2.) All filters should use MemoryPool instead of new byte[].

3.) The last filter can directly write to the resulting array, save one copy operation.

To enable this there should be a FilterInfo structure with currently present fields + MemoryProvider.

This class would have method GetResultMemory() which normally provides a MemoryPool memory. But if the filter is the last one in pipeline, it returns the sliced result buffer.

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

No branches or pull requests

1 participant