GitHub repository: mightyhouseinc/polyfile
Description: A pure Python cleanroom implementation of libmagic, with instrumented parsing from Kaitai struct and an interactive hex viewer