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

Function getCompressionFormatFromExtension

src/utils/compression.ts:93–104  ·  view source on GitHub ↗
(
  filePath: string,
)

Source from the content-addressed store, hash-verified

91}
92
93export const getCompressionFormatFromExtension = (
94 filePath: string,
95): CompressionFormat | undefined => {
96 switch (extname(filePath).toLowerCase()) {
97 case '.gz':
98 return CompressionFormat.GZIP
99 case '.xz':
100 return CompressionFormat.XZ
101 default:
102 return undefined
103 }
104}
105
106export const getCompressionFormatFromHeader = (
107 header: Buffer,

Callers 3

parseCliArgsFunction · 0.90
detectCompressionFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected