MCPcopy Index your code
hub / github.com/cameri/nostream / parseCompressionFormat

Function parseCompressionFormat

src/utils/compression.ts:81–91  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

79}
80
81export 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
93export const getCompressionFormatFromExtension = (
94 filePath: string,

Callers 2

parseCliArgsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected