WIP: Store compressed data on the Worker
#3968
Draft
+30
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another approach to issue ( #3656 ). Found it a bit easier to articulate this as a PR as opposed to a comment. Hope that is ok.
As
serialize_bytelistalready performs compression, this approach simply leverages that feature and stores the data in adictin memory. Nests anotherBufferinself.datafor transitioning in-memory data to in-memory compressed data and then to on disk compressed data (this last step is the same as before).If we decide we like this approach, something that I could use some advice on would be determining an appropriate transition/exposing that in a sensible way to the user. Though we need not worry about that if another approach may be more appropriate.
cc @prasunanand @TomAugspurger @martindurant @mrocklin @madsbk @quasiben