Skip to content

Conversation

@kornelski
Copy link
Contributor

@kornelski kornelski commented Dec 22, 2024

The chunk size is known ahead of time, and it's always fully read, so there's no need to have a separate state for growing it incrementally.

With the simplified state, it would also be possible to move parsing of chunks after the crc check.

@fintelia
Copy link
Contributor

This might be better to defer until after we've gotten 0.18.0 out.

It has a few consequences that are a bit hard to think through: it allocates space for entire chunks ahead of time rather than waiting to see whether we hit an EOF first and it mem::take's vectors in certain places without a shrink_to_fit first, so their capacity could be far larger than their current length.

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.

3 participants