Skip to content

Commit da94629

Browse files
committed
[libnfsviv][Python] bump to version 3.8, performance improvements, add wwww support, refactor
1 parent 8bba2f4 commit da94629

18 files changed

Lines changed: 2043 additions & 1283 deletions

.github/workflows/ci-cli.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ jobs:
185185
with:
186186
python-version: ${{ matrix.python-version }}
187187
architecture: ${{ matrix.arch }}
188+
- name: "ls -lga"
189+
shell: bash
190+
run: |
191+
ls -lga ./tests/in
188192
- name: "pytest"
189193
shell: bash
190194
run: |

.github/workflows/ci-python.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
matrix:
1616
os: [ macos-latest, ubuntu-latest, windows-latest ]
1717
python-version: [ "3.10", "3.13", "3.14", "3.14t" ]
18+
# python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t" ]
1819

1920
name: Python ${{ matrix.python-version }} (${{ matrix.os }})
2021
steps:
@@ -41,9 +42,18 @@ jobs:
4142
python -c "import subprocess; import sys; ret = subprocess.run([ sys.executable, 'print_version.py' ]); print('Exit code', ret.returncode); sys.exit(0)"
4243
python -c "import unvivtool; help(unvivtool)"
4344
44-
- name: "pytest"
45+
- name: "pytest test_smoketest"
4546
shell: bash
4647
run: |
4748
python -m pip install -q pytest
4849
pytest -s -vv ./tests/test_smoketest.py
50+
51+
- name: "pytest test_decodeencode"
52+
shell: bash
53+
run: |
4954
pytest -s -vv ./tests/test_decodeencode.py
55+
56+
- name: "pytest test_update"
57+
shell: bash
58+
run: |
59+
pytest -s -vv ./tests/test_update.py

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# unvivtool
2-
unvivtool is a VIV/BIG decoder/encoder for uncompressed BIGF, BIGH, and BIG4 archives.
2+
unvivtool is a VIV/BIG decoder/encoder for BIGF, BIGH, and BIG4 archives.
33
unvivtool is available as command-line interface and as Python extension module.
44
It is based on a dependency-free header-only library written in C89.
55
Python bindings are written in CPython.
66
Supported on Windows and Linux. Tested on macOS.
77

88
Purported VIV/BIG archives can contain faulty or manipulated header information.
9-
unvivtool is designed to validate and safely recover data as much as possible.
9+
unvivtool is designed to validate and recover data as much as possible.
1010
The decoder performs a single pass buffered read of the archive header only; content extraction is optional.
1111

1212
Developers can drop-in and use, the encoder/decoder and some data analysis functions from ``libnfsviv.h``.
@@ -27,21 +27,23 @@ Developers can drop-in and use, the encoder/decoder and some data analysis funct
2727
* Win98 compatibility
2828

2929
## File format
30-
The supported formats are called ``BIGF``, ``BIGH``, ``BIG4``, and ``0xFBC0`` (equals first 4 bytes).<br/>
31-
All four are variants of each other and extend ``EA IFF 85`` (see [2]) archives.<br/>
30+
The supported archive formats are called ``BIGF``, ``BIGH``, ``BIG4``, ``0x8000FBC0``, and ``wwww`` (equals first 4 bytes).<br/>
31+
The first four are variants of each other, the last is a precursor.
32+
All are derived from ``EA IFF 85`` (see [2]).<br/>
3233
Archives can be arbitrarily large and can contain arbitrarily many entries.<br/>
33-
Typical file extensions are ``.VIV`` and ``.BIG``.
34+
Typical file extensions are ``.VIV`` and ``.BIG``.<br/>
3435

3536
## Installation / Documentation
3637
Command-line interface: [/cli/README.md](/cli/README.md)<br/>
3738
Python extension module: [/python/README.md](/python/README.md)
3839

3940
## References
4041
The canonical ``BIGF`` format description was taken from [1].
41-
Description of fixed directory entry length, format deviations and ``0xFBC0``, own work.
42+
Unofficial descriptions of fixed directory entry length, format deviations and ``0x8000FBC0`` (see [3]), own work.
4243

4344
[1] D. Auroux et al. (1998) [_The unofficial Need For Speed III file format specifications - Version 1.0_](/references/unofficial_nfs3_file_specs_10.txt)<br/>
44-
[2] J. Morrison (1985) _"EA IFF 85" Standard for Interchange Format Files_
45+
[2] J. Morrison (1985) _"EA IFF 85" Standard for Interchange Format Files_<br/>
46+
[3] B. F. (2024) [_Unofficial 0xFBC0 File Format Specification (.viv)_](/references/viv_C0FB_specs.md)
4547

4648
## Information
4749
__unvivtool License:__ GNU General Public License v3.0+<br/>

cli/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# unvivtool - command-line interface
2-
unvivtool is a VIV/BIG decoder/encoder for uncompressed BIGF, BIGH, and BIG4 archives.
2+
unvivtool is a VIV/BIG decoder/encoder for BIGF, BIGH, and BIG4 archives.
33

44
Purported VIV/BIG archives can contain faulty or manipulated header information.
55
unvivtool is designed to validate and recover data as much as possible.
@@ -16,7 +16,7 @@ cd unvivtool
1616
gcc -std=c89 -D_GNU_SOURCE -fPIE -pie -O2 unvivtool.c -o unvivtool
1717
```
1818
### Compiling for Windows
19-
Requires MSVC.
19+
Requires MSVC 6.0 or later.
2020
```
2121
git clone https://github.com/bfut/unvivtool
2222
cd unvivtool
@@ -83,7 +83,7 @@ Options:
8383
-i<N> decode file at 1-based Index <N>
8484
-f<name> decode File <name> (cAse-sEnsitivE) from archive, overrides -i
8585
-x decode/encode to/from filenames in base16/heXadecimal
86-
-fmt<format> encode to Format 'BIGF' (default), 'BIGH', 'BIG4' or 'C0FB' (w/o quotes)
86+
-fmt<format> encode to Format 'BIGF' (default), 'BIGH', 'BIG4', 'C0FB' or 'wwww' (w/o quotes)
8787
-p Print archive contents, do not write to disk (dry run)
8888
-we Write re-Encode command to path/to/input.viv.txt (keep files in order)
8989
-v print archive contents, Verbose

0 commit comments

Comments
 (0)