Manipulate magic bytes: vim <file> Convert to hexdump and manipulate bytes :%!xxd Convert back :%!xxd -r