import { Agent as HttpAgent } from "http";import { Agent as HttpsAgent } from "https";import { Readable } from "stream";
import { debug as d } from "debug";export { d as debug };
export const itrToStream = (itr: AsyncIterable<Uint8Array>) => Readable.from(itr, { objectMode: false });
export function baseFetchConfig(apiRoot: string) { if (apiRoot.startsWith("https:")) { return { compress: true, agent: new HttpsAgent({ keepAlive: true }) }; } else if (apiRoot.startsWith("http:")) { return { agent: new HttpAgent({ keepAlive: true }) }; } else return {};}
export const toRaw = Symbol("InputFile data");