(options: { compression?: Compression | null; compressionOptions?: CompressionOptions | null })
| 167 | } |
| 168 | |
| 169 | function getLevel(options: { compression?: Compression | null; compressionOptions?: CompressionOptions | null }) { |
| 170 | if (options.compression === "STORE") { |
| 171 | return 0; |
| 172 | } |
| 173 | const level = options.compressionOptions?.level; |
| 174 | if (level === undefined) { |
| 175 | return undefined; |
| 176 | } |
| 177 | return Math.max(0, Math.min(9, level)); |
| 178 | } |
| 179 | |
| 180 | async function toZipSource( |
| 181 | content: InputByType[keyof InputByType] |