if true
, endian is set to little, if false
endian is set to big
Add a file to this SARC archive.
a FileEntry instance
Add a file to the SARC archive.
In order to 'put' it in a folder, use a custom destinationFilePath
the path to the file you want to add
e.g. image.jpg
, or extra/image.jpg
Add all files inside a folder to the SARC archive (recursively). Notes:
destinationFolderPath
the path to the folder you want to add
e.g. images
, or extra/images
Add a file to this SARC archive.
In order to 'put' it in a folder, use a custom destinationFilePath
raw file Buffer
e.g. image.jpg
, or extra/image.jpg
Extract all SARC archive contents to a directory.
the destination directory path
Get all FileEntries in this SARC archive.
Return whether the SARC archive is little endian.
true
if little, false
if big
Load and parse a SARC archive. File may be compressed with Yaz0.
the raw sarc file data Buffer
Load and parse a SARC archive. File may be compressed with Yaz0.
the sarc file path.
Remove a specific FileEntry from the contents.
Use getFiles()
to know which objects are available.
the FileEntry object to remove.
Save current SARC archive to a Buffer
.
what Yaz0 compression level to use. 0
: no compression (fastest), 9
: best compression (slowest)
the output file Buffer
Save current SARC archive to file.
the save destination. Will use .szs
(compressed) or .sarc
(uncompressed) if no file extension was provided.
what Yaz0 compression level to use. 0
: no compression (fastest), 9
: best compression (slowest)
full output file path
Instead of using the default-default alignment of 0x04
, use a different value.
the new default alignment
Set the hash multiplier used for filename hashing.
the new hash multiplier
Set endian of the SARC archive to little.
if true
, endian is set to little, if false
endian is set to big
Generated using TypeDoc
Construct a new SARC archive. This library