You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, we ran into an issue of Cloudflare that had them sending erroneous content-encoding headers to our mobile app. It got us thinking about how compression should be handled. Right now, Dio doesn't do any decompression on its own.
The goal of this issue is to see the following compressions supported in Dio:
gzip
br
deflate
Solution Brainstorm
I'm not sure what the best way to go about it is, especially with Brotli as there are a couple of community libraries, but one has some issues and the other is built on FFI with other compression formats that are unnecessary. Dart already has gzip support but it's inside of dart:io.
Another question is, should this be on the main thread? Preferably if its large enough, it would be offloaded to another thread in native implementations, but I'd like to see that configurable as it is with the jsonDecodeCallback, mostly because we have long-running worker threads in our app and we'd like to put the work on that instead of running compute or Isolate.run() and waste time spinning up a new isolate.
The text was updated successfully, but these errors were encountered:
Another question is, should this be on the main thread? Preferably if its large enough, it would be offloaded to another thread in native implementations, but I'd like to see that configurable as it is with the jsonDecodeCallback, mostly because we have long-running worker threads in our app and we'd like to put the work on that instead of running compute or Isolate.run() and waste time spinning up a new isolate.
Do you know whether the decompression is blocking or happens in the background on Android/iOS?
Thanks!
Request Statement
Today, we ran into an issue of Cloudflare that had them sending erroneous
content-encoding
headers to our mobile app. It got us thinking about how compression should be handled. Right now, Dio doesn't do any decompression on its own.The goal of this issue is to see the following compressions supported in Dio:
Solution Brainstorm
I'm not sure what the best way to go about it is, especially with Brotli as there are a couple of community libraries, but one has some issues and the other is built on FFI with other compression formats that are unnecessary. Dart already has gzip support but it's inside of
dart:io
.Another question is, should this be on the main thread? Preferably if its large enough, it would be offloaded to another thread in native implementations, but I'd like to see that configurable as it is with the
jsonDecodeCallback
, mostly because we have long-running worker threads in our app and we'd like to put the work on that instead of runningcompute
orIsolate.run()
and waste time spinning up a new isolate.The text was updated successfully, but these errors were encountered: