-
-
Notifications
You must be signed in to change notification settings - Fork 9
Python Interfaces
To use the Python interface place the DSCSTools.pyd (renamed .dll) or DSCSTools.so in a folder where your program finds it as a viable module (such as the root folder).
If you plan to use the pre-build binary you will have to use Python 3.8. Other versions require the library to be recompiled.
Using import DSCSTools
gives you access to the following functions:
Extracts a MDB1 archive given by sourceArchive
and extracts it into targetPath
or throws an error if something went wrong.
The encryption status of the archive doesn't matter.
Extracts a file with the internal path filePath
from a MDB1 archive given by sourceArchive
into targetPath
.
The encryption status of the archive doesn't matter.
Returns the ArchiveInfo of an MDB1 archive given by sourceArchive
. See the ArchiveInfo object docs down below.
The encryption status of the archive doesn't matter.
Packs a folder given by sourcePath
into an encrypted MDB1 archive saved at targetArchive
.
You can optionally set the compression mode and whether to print progress reports to stdout.
Valid values for compressMode are:
-
DSCSTools.CompressMode.none
-> no compression at all -
DSCSTools.CompressMode.normal
-> regular compression -
DSCSTools.CompressMode.advanced
-> regular compression with duplicate detection
Performs synchronous en-/decryption of the given sourceFile
and saves it into targetFile
.
Extracts the MBE file or folder containing them given by sourcePath
into targetPath
.
The structures
folder must be at the root of your execution context for this to work.
Packs the given MBE folder given by sourcePath
into an MBE saved into targetFile
.
The structures
folder must be at the root of your execution context for this to work.
Extracts the AFS2 archive given by sourceFile
into targetPath
.
Packs the folder given by sourcePath
into an AFS2 archive saved into targetFile
.
Encrypts the PC save file given by sourceFile
into targetFile
.
Decrypts the PC save file given by sourceFile
into targetFile
.
Everything given are properties that can be accessed normally from the returned object.
- ArchiveStatus -> DSCSTools.ArchiveStatus | gives the status of the archive, should be checked to make sure it's valid
- FileCount -> Number of files in the archive
- DataStart -> Starting offset of the actual file data
- Files -> List of FileInfo's of the files contained in the archive
- FileName -> the path of the file, to be used with extractMDB1File calls
- DataOffset -> the offset of the file data in the archive
- DataSize -> the size of the file after compression
- DataCompressedSize -> the size of the file within the archive, if this equals DataSize it's not encrypted