mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 06:54:04 +09:00
gzip now works after some TVDOS kernel fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user