Skip to content

Instantly share code, notes, and snippets.

View NikolasTzimoulis's full-sized avatar

Nikolas NikolasTzimoulis

View GitHub Profile
@NikolasTzimoulis
NikolasTzimoulis / witness_lz4d.py
Last active July 11, 2024 02:18 — forked from mfgmfg/witness_lz4d.py
Extract .SOUND files from the videogame The Witness
import struct
import sys
import os
MAX_OUTPUT_SIZE = 1 << 24 # 16 megabytes
def load_binary_file(fn, nbytes=100000000):
data = []
with open(fn, "rb") as src:
byte = src.read(1)