Skip to content

Commit 85bf8da

Browse files
author
Kazuki Suzuki Przyborowski
committed
Added support for file start offset
1 parent 652084d commit 85bf8da

3 files changed

Lines changed: 516 additions & 1167 deletions

File tree

foxfile.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Copyright 2018-2024 Game Maker 2k - http://intdb.sourceforge.net/
1515
Copyright 2018-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
1616
17-
$FileInfo: foxfile.py - Last Update: 8/26/2025 Ver. 0.21.4 RC 1 - Author: cooldude2k $
17+
$FileInfo: foxfile.py - Last Update: 8/29/2025 Ver. 0.22.0 RC 1 - Author: cooldude2k $
1818
'''
1919

2020
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
@@ -173,7 +173,7 @@ def handler(signum, frame):
173173
checkcompressfile = pyfoxfile.CheckCompressionSubType(
174174
input_file, fnamedict, True)
175175
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
176-
tmpout = pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
176+
tmpout = pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, 0, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
177177
else:
178178
tmpout = pyfoxfile.PackFoxFileFromInFile(
179179
input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.verbose, False)
@@ -187,35 +187,35 @@ def handler(signum, frame):
187187
input_file, fnamedict, True)
188188
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
189189
pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt,
190-
False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
190+
False, 0, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
191191
else:
192192
pyfoxfile.PackFoxFileFromInFile(input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.verbose, False)
193193
if(not tmpout):
194194
sys.exit(1)
195195
else:
196196
pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt,
197-
False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
197+
False, 0, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.verbose, False)
198198
elif active_action == 'extract':
199199
if getargs.convert:
200200
checkcompressfile = pyfoxfile.CheckCompressionSubType(
201201
input_file, fnamedict, True)
202202
tempout = BytesIO()
203203
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
204-
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False)
204+
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, 0, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False)
205205
else:
206206
tmpout = pyfoxfile.PackFoxFileFromInFile(
207207
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, False, False)
208208
if(not tmpout):
209209
sys.exit(1)
210210
input_file = tempout
211-
pyfoxfile.UnPackFoxFile(input_file, getargs.output, False, 0, 0, getargs.skipchecksum,
211+
pyfoxfile.UnPackFoxFile(input_file, getargs.output, False, 0, 0, 0, getargs.skipchecksum,
212212
fnamedict, getargs.verbose, getargs.preserve, getargs.preserve, False, False)
213213
elif active_action == 'list':
214214
if getargs.convert:
215215
checkcompressfile = pyfoxfile.CheckCompressionSubType(
216216
input_file, fnamedict, True)
217217
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
218-
tmpout = pyfoxfile.FoxFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, False, getargs.verbose, False, False)
218+
tmpout = pyfoxfile.FoxFileListFiles(input_file, "auto", 0, 0, 0, getargs.skipchecksum, fnamedict, False, getargs.verbose, False, False)
219219
else:
220220
tmpout = pyfoxfile.InFileListFiles(input_file, getargs.verbose, fnamedict, False, False, False)
221221
if(not tmpout):
@@ -228,15 +228,15 @@ def handler(signum, frame):
228228
input_file, fnamedict, True)
229229
tempout = BytesIO()
230230
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
231-
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False, False)
231+
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, 0, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False, False)
232232
else:
233233
tmpout = pyfoxfile.PackFoxFileFromInFile(
234234
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, False, False)
235235
input_file = tempout
236236
if(not tmpout):
237237
sys.exit(1)
238238
fvalid = pyfoxfile.FoxFileValidate(
239-
input_file, "auto", fnamedict, False, getargs.verbose, False)
239+
input_file, "auto", 0, fnamedict, False, getargs.verbose, False)
240240
if(not getargs.verbose):
241241
import sys
242242
import logging

0 commit comments

Comments
 (0)