michalc / stream-parse-openttd

Python package to parse the contents of OpenTTD save games

Repository from Github https://github.commichalc/stream-parse-openttdRepository from Github https://github.commichalc/stream-parse-openttd

stream-parse-openttd

Python package to parse the contents of OpenTTD save games (in a streaming way)

Work in progress. Only a small amount of data is extracted

Usage

from stream_parse_openttd import stream_parse_openttd

with open('path/to/saved-game.sav', 'rb') as f:
    for chunk_id in stream_parse_openttd(iter(lambda: f.read(65536), b'')):
        print(chunk_id)

About

Python package to parse the contents of OpenTTD save games

License:MIT License


Languages

Language:Python 100.0%