decord/source/modules/gateway/GatewayZstdUtils.native.tsx

35 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 13122
// Function ID: 13123
2026-07-20 16:05:17 +00:00
// Name: supportsZstd
2026-08-25 06:04:03 +00:00
// Dependencies: [17, 500, 13123, 2]
2026-07-20 16:05:17 +00:00
// Exports: createZstdContextWeb, supportsZstd
2026-08-25 06:04:03 +00:00
// Module 13122 (supportsZstd)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import enforcingDefault from "enforcing" /* 13123 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const NativeModules = get_ActivityIndicator.NativeModules;
const result = set.fileFinishedImporting("modules/gateway/GatewayZstdUtils.native.tsx");
2026-07-20 16:05:17 +00:00
export const supportsZstd = function supportsZstd() {
if (obj.isAndroid()) {
2026-08-24 06:08:38 +00:00
let flag = enforcingDefault.getConstants().supportsZstd;
const obj2 = enforcingDefault;
2026-07-20 16:05:17 +00:00
} else {
const DCDCompressionManager = NativeModules.DCDCompressionManager;
2026-07-29 08:29:29 +00:00
flag = undefined;
if (DCDCompressionManager != null) {
flag = DCDCompressionManager.supportsZstd;
}
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return flag;
2026-07-20 16:05:17 +00:00
};
export const createZstdContextWeb = function createZstdContextWeb() {
2026-08-24 06:08:38 +00:00
error = new Error("Attempting to use createZstdContextWeb in a native context. Use MobileGatewayCompressionHandler instead.");
2026-07-20 16:05:17 +00:00
throw error;
};