Recovery of file types using a header search