但是,在某些情况下,例如在处理整数或压缩文件时,需要能够读取和写入二进制数据。
In certain situations, however — for example, when you're working with integers or compressed files — you need to be able to read and write binary data.
可以用file对象读取数据、写入数据或把数据添加到文件,以及处理二进制或文本数据。
You can use the file object to read data, to write data, to append data to a file, and to work with either binary or textual data.
文本段同样会将二进制文件映射到内存,但文件映射区域的写入操作只能以程序收到段错误而告终。
The text segment also maps your binary file in memory, but writes to this area earn your program a Segmentation Fault.
作为一个附加的好处,这个示例应用程序也使您能够练习对于所有GAE项目来说均非常重要的一些任务,如写入和读取二进制文件。
As an added benefit, the example application also lets you practice tasks that are key to any GAE project that writes out and serves up binaries.
作为一个附加的好处,这个示例应用程序也使您能够练习对于所有GAE项目来说均非常重要的一些任务,如写入和读取二进制文件。
As an added benefit, the example application also lets you practice tasks that are key to any GAE project that writes out and serves up binaries.
应用推荐