gzip now works after some TVDOS kernel fixes

This commit is contained in:
minjaesong
2023-05-10 21:03:26 +09:00
parent c318cb0419
commit 1efec13ecf
3 changed files with 24 additions and 22 deletions

View File

@@ -29,7 +29,7 @@ const toStdout = (options.indexOf("-C") >= 0)
const file = files.open(_G.shell.resolvePathInput(filePath).full)
const file2 = files.open(_G.shell.resolvePathInput(filePath).full + ".gz")
//const file2 = files.open(_G.shell.resolvePathInput(filePath).full + ".gz")
// returns Java byte[]
const actionfun = (decompMode) ?
@@ -39,15 +39,11 @@ const actionfun = (decompMode) ?
const writefun = (toStdout) ?
(bytes) => print(String.fromCharCode.apply(null, bytes))
(bytes) => print(btostr(bytes))
:
(bytes) => file2.swrite(String.fromCharCode.apply(null, bytes))
(bytes) => file.swrite(btostr(bytes))
////////////////////////////////////////
writefun(actionfun(file.bread()))
//file2.swrite(file.sread())
// FIXME compression seems to work fine but this program writes lots of ?????s

View File

@@ -36,14 +36,14 @@ const COL_HL_EXT = {
}
const EXEC_FUNS = {
"wav": (f) => _G.shell.execute(`playwav ${f} /i`),
"adpcm": (f) => _G.shell.execute(`playwav ${f} /i`),
"mp3": (f) => _G.shell.execute(`playmp3 ${f} /i`),
"mp2": (f) => _G.shell.execute(`playmp2 ${f} /i`),
"mov": (f) => _G.shell.execute(`playmov ${f} /i`),
"pcm": (f) => _G.shell.execute(`playpcm ${f} /i`),
"ipf1": (f) => _G.shell.execute(`decodeipf ${f} /i`),
"ipf2": (f) => _G.shell.execute(`decodeipf ${f} /i`),
"wav": (f) => _G.shell.execute(`playwav ${f} -i`),
"adpcm": (f) => _G.shell.execute(`playwav ${f} -i`),
"mp3": (f) => _G.shell.execute(`playmp3 ${f} -i`),
"mp2": (f) => _G.shell.execute(`playmp2 ${f} -i`),
"mov": (f) => _G.shell.execute(`playmov ${f} -i`),
"pcm": (f) => _G.shell.execute(`playpcm ${f} -i`),
"ipf1": (f) => _G.shell.execute(`decodeipf ${f} -i`),
"ipf2": (f) => _G.shell.execute(`decodeipf ${f} -i`),
"bas": (f) => _G.shell.execute(`basic ${f}`)
}