(input: string)
| 79 | } |
| 80 | |
| 81 | export const parseCompressionFormat = (input: string): CompressionFormat => { |
| 82 | switch (input.trim().toLowerCase()) { |
| 83 | case 'gzip': |
| 84 | case 'gz': |
| 85 | return CompressionFormat.GZIP |
| 86 | case 'xz': |
| 87 | return CompressionFormat.XZ |
| 88 | default: |
| 89 | throw new Error(`Unsupported compression format: ${input}. Use gzip|gz|xz.`) |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | export const getCompressionFormatFromExtension = ( |
| 94 | filePath: string, |
no outgoing calls
no test coverage detected