Skip to content

Commit 8c55e95

Browse files
committed
decompress file
1 parent f5ad66b commit 8c55e95

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

xmake/modules/utils/archive/extract_xmz.lua

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020

2121
-- imports
2222
import("core.base.option")
23+
import("core.compress.lz4")
24+
25+
-- decompress file
26+
function _decompress_file(archivefile, outputfile, opt)
27+
lz4.decompress_file(archivefile, outputfile)
28+
end
2329

2430
-- extract file
2531
--
@@ -29,4 +35,8 @@ import("core.base.option")
2935
--
3036
function main(archivefile, outputdir, opt)
3137
opt = opt or {}
38+
39+
local archivefile_tmp = os.tmpfile({ramdisk = false})
40+
_decompress_file(archivefile, archivefile_tmp)
41+
os.tryrm(archivefile_tmp)
3242
end

0 commit comments

Comments
 (0)