https://github.com/reklatsmasters/bsa
Bethesda Softworks Archive compress/decompress
https://github.com/reklatsmasters/bsa
archive bethesda bsa compress decompress extract js node oblivion skyrim tes
Last synced: 8 months ago
JSON representation
Bethesda Softworks Archive compress/decompress
- Host: GitHub
- URL: https://github.com/reklatsmasters/bsa
- Owner: reklatsmasters
- License: mit
- Created: 2016-10-16T19:24:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-02T11:11:37.000Z (over 9 years ago)
- Last Synced: 2025-04-13T02:52:25.112Z (about 1 year ago)
- Topics: archive, bethesda, bsa, compress, decompress, extract, js, node, oblivion, skyrim, tes
- Language: JavaScript
- Homepage:
- Size: 38.1 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# bsa
[](https://travis-ci.org/ReklatsMasters/bsa)
[](https://npmjs.org/package/bsa)
[](https://npmjs.org/package/bsa)
[](https://npmjs.org/package/bsa)
Bethesda Softworks Archive extractor. Currently supports v103 only.
## Usage
```js
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...
]
*/
```
## API
#### `list(buf: Buffer): Array`
#### `ls(buf: Buffer): Array`
Return the list of files with folder names in archive
#### `extractFile(buf: Buffer, index: Number): Buffer`
Extract file based on index in file list.
#### `extract* (buf: Buffer)`
Iterator / generator to extract all files.
```js
for (const file of bsa.extract(bsafile)) {
// do stuff...
}
```
## License
MIT, 2016 - 2025 (c) Dmitry Tsvettsikh