Skip to content

Commit

Permalink
decompress file
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 21, 2024
1 parent f5ad66b commit 8c55e95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xmake/modules/utils/archive/extract_xmz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@

-- imports
import("core.base.option")
import("core.compress.lz4")

-- decompress file
function _decompress_file(archivefile, outputfile, opt)
lz4.decompress_file(archivefile, outputfile)
end

-- extract file
--
Expand All @@ -29,4 +35,8 @@ import("core.base.option")
--
function main(archivefile, outputdir, opt)
opt = opt or {}

local archivefile_tmp = os.tmpfile({ramdisk = false})
_decompress_file(archivefile, archivefile_tmp)
os.tryrm(archivefile_tmp)
end

0 comments on commit 8c55e95

Please sign in to comment.