I'm trying to develop a worker that stores and fetches gzipped data in R2. Data is a ~300kb json file but when gzipped is only ~20kb. I've enabled polyfills (setting
node_compat = true
node_compat = true
in wrangler.toml) to be able to use zlib. Compressing the json works fine. However, when trying to uncompress it I'm getting the following 1. "TypeError: Not a string or buffer" when trying to use an ArrrayBuffer 2. "TypeError: Cannot read properties of undefined (reading '-5')" when converting data from R2 object to a Buffer.