This repository contains codes used to unpack binary files that are stored with arbitrary bit depth into new binary files that are stored  8 or 16-bit bytes. These codes were inspired by working with raw image files produced by Photron high-speed cameras, whose information is contained in 12-bit bytes, which makes them annoying to read by other programs.