logoalt Hacker News

Reverse-engineering Codemasters' BIGF archive format in Ruby

9 pointsby davidslvlast Tuesday at 5:10 PM3 commentsview on HN

Comments

tn1today at 4:35 AM

Ruby's un/pack is of course heavily inspired by Perl's: https://perldoc.perl.org/functions/pack

However, slicing strings is a little easier syntax-wise than in Perl.

davidslvlast Tuesday at 5:12 PM

Author here. This started as a hobby attempt to understand Codemasters' old driving AI, which had received quite a few interesting game reviews at the time. Which meant first reading their "BIGF" archive format. The surprise was Ruby: String#unpack is basically a fast, C-backed binary parser hiding in the stdlib, and the whole reader is dependency-free. Repo (MIT): https://github.com/davidslv/bigf

Honest note: AI-assisted throughout — I steered and verified every claim against the bytes. No game data committed; tests synthesise fixtures from the documented format.

show 1 reply