xzDefaultMaxPreallocateSize top-level property

int xzDefaultMaxPreallocateSize
final

Default for XZDecoder.maxPreallocateSize.

tood: reconsider wasm 2 GB where a failed allocation is survivable. 256 MB on the web. dart2js and dart2wasm kill the page instead of throwing something catchable. dart2wasm cannot reach 1 GB at all. 256 MB stays under that

Implementation

final int xzDefaultMaxPreallocateSize =
    xzIsolatesSupported ? 1 << 31 : 256 * 1024 * 1024;