为了描述算法如何工作,您可以使用伪代码。你会用什么来定义二进制文件的结构?例如,我有一个具有以下结构的文件:
(n) - int32 containing number of files
then, repeated n times:
(len) - int32 containing length of file name
(name) - len bytes containing file name
(size) - file size
(offset) - offset from file start from which starts file contents
哪种方式最好描述这样的文件结构?