Because the concept of "lines" isn't relevant for binary files (logical data constructs are not generally terminated by newlines), you must always specify the number of bytes that you wish to read in.
由于“行”的概念与二进制文件无关(逻辑数据结构通常都不是由新行终止),因此您必须指定需要读入的字节数。
If you've read any of my previous articles (see Resources), you'll notice that I favor logical operators over writing several lines of code.
如果您读过我以前的文章(参见参考资料),就会注意到我喜欢使用逻辑操作符,而不是编写多行代码。
应用推荐