MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / compress

Function compress

daemon/src/common/compress.ts:55–63  ·  view source on GitHub ↗
(
  sourceZip: string,
  files: string[],
  fileCode?: string
)

Source from the content-addressed store, hash-verified

53}
54
55export async function compress(
56 sourceZip: string,
57 files: string[],
58 fileCode?: string
59): Promise<boolean> {
60 if (!checkFileName(sourceZip) || files.some((v) => !checkFileName(v)))
61 throw new Error(COMPRESS_ERROR_MSG.invalidName);
62 return await useZip(sourceZip, files, fileCode);
63}
64
65export async function decompress(
66 zipPath: string,

Callers 2

zipMethod · 0.90
mainFunction · 0.85

Calls 2

useZipFunction · 0.85
checkFileNameFunction · 0.70

Tested by

no test coverage detected