Skip to content

Instantly share code, notes, and snippets.

View Cars-10's full-sized avatar

Cars10 Cars-10

  • Berlin, Germany
View GitHub Profile
@Cars-10
Cars-10 / validate-aiff.py
Last active November 9, 2020 20:06
Validate sizes of chunks in AIFF file to filesize
#!/usr/bin/env python3
import sys
from mutagen.aiff import AIFFFile
def validate_chunk(chunk, level=0):
valid = True
indent = " " * level
if hasattr(chunk, 'subchunks'):
print("{0}{1} {2}\t(offset: {3}, size: {4}, data-size: {5})".format(