I am trying to encrypt large files in browser on the client side. however, I get a crash on Chrome Android when loading the files. I know chrome has a hard cap on blob size of 2 GiB on Chrome desktop version. But on Android the size is dynamic and related to the total physical memory of the device and the disk space available according to this
The crash only occurred in Google Chrome and not other Chromium based browsers like Brave for example when trying the same files or larger
So how can I query such limits in order to show the user some feedback and not crash the browser?
I also thought about slicing the file into small chunks but I don't know what can be the largest chunk size without crashing?