It's something that was already on my backlog but there's a bunch of technical and non-technical hea
It's something that was already on my backlog but there's a bunch of technical and non-technical headwinds. I don't think that's something that we can support any time soon. The main obstacle is that all entrypoints into R2 require that you specify the size of the object you're giving us (which AFAIK isn't different from any other object storage system). Practically this means you'll need to buffer the compressed file in memory (so that the length becomes known) which then starts having a limit to the size of file you can compress. You can kind of do this via a Worker binding by using
I want to evolve R2 here to be much more flexible but that feature is definitely a couple of years out if not longer.
CompressionStream but you'll have to handle what happens if you have too many concurrent requests at once or a poorly compressible file and suddenly you're potentially hitting the Workers memory limit.I want to evolve R2 here to be much more flexible but that feature is definitely a couple of years out if not longer.


