/** * 视频采集包解压或项目打包任务。 * @example 模块内部上下文 * ```ts * const input: VideoArchiveJob = { type: 'pack', files: { 'story.txt': new Uint8Array([65]) } } * ``` */ type VideoArchiveJob = { type: 'read'; bytes: Uint8Array; } | { type: 'pack'; files: Record; }; /** * 数据格式错误在当前任务内结算,便于后续任务复用线程。 * @example 模块内部上下文 * ```ts * const invalid: VideoArchiveReply = { type: 'invalid' } * ``` */ type VideoArchiveReply = { type: 'files'; files: Record; } | { type: 'zip'; bytes: Uint8Array; } | { type: 'invalid'; }; export type { VideoArchiveJob, VideoArchiveReply };