20 lines
672 B
TypeScript
20 lines
672 B
TypeScript
// Metro module 12709 (f12710).
|
|
import { NativeModules } from "react-native";
|
|
import { isAndroid } from "../../utils/PlatformUtils";
|
|
import Module12710 from "../../_bundle/Module12710";
|
|
export function supportsZstd() {
|
|
let supportsZstd2;
|
|
if (isAndroid()) {
|
|
supportsZstd2 = Module12710.getConstants().supportsZstd;
|
|
} else {
|
|
supportsZstd2 = NativeModules.DCDCompressionManager?.supportsZstd;
|
|
if (supportsZstd2 == null) {
|
|
supportsZstd2 = false;
|
|
}
|
|
}
|
|
return supportsZstd2;
|
|
}
|
|
export function createZstdContextWeb() {
|
|
throw new Error("Attempting to use createZstdContextWeb in a native context. Use MobileGatewayCompressionHandler instead.");
|
|
}
|