Bethesda Softworks Archive extractor. Currently supports v103 only.
import * as bsa from 'bsa';
const file = fs.readFileSync('../Oblivion/Data/DLCShiveringIsles - Voices.bsa');
console.log(bsa.ls(file));
/*
output:
[ 'sound\\voice\\oblivion.esm\\imperial\\f\\senqdmania_goodbye_00040bb3_1.mp3',
'sound\\voice\\oblivion.esm\\imperial\\f\\senqddementia_greeting_00068bc0_1.mp3',
'sound\\voice\\oblivion.esm\\imperial\\f\\senqddementia_greeting_00068bca_1.mp3',
'sound\\voice\\oblivion.esm\\imperial\\f\\se38_se38talkitemc_00082436_1.lip',
// more other files...
]
*/Return the list of files with folder names in archive
Extract file based on index in file list.
-
optionskeepFileMetadata: false
When
trueemitBSAFileMetadatadata object.
Iterator / generator to extract all files.
for (const file of bsa.extract(bsafile)) {
// do stuff...
}For options see above.
- get
data: Buffer
Get file data.
- get
fileName: string
Get file name. If file name is missing, it returns file hash as a hex string.
- get
filePath: string or null
Get full file path in archive exclude file name. Depending on archive options it might be null.
MIT, 2016 - 2025 (c) Dmitry Tsvettsikh