gpt4 book ai didi

java - android 的新手-将 xml 文档编译成二进制格式有什么好处

转载 作者:行者123 更新时间:2023-11-29 21:16:50 25 4
gpt4 key购买 nike

我正在阅读的一本在线书籍指出:

To do this, you can place these XML files in the /res/xml/ subdirectory to have them compiled into binary format. But if you place files, including XML files, in the /res/raw/ directory instead, they don’t get compiled into binary format.

我不确定将 xml 文件编译成二进制格式的目的或好处是什么。

最佳答案

二进制格式通常会提供更小的文件大小,而且处理和扫描速度更快、更容易。这些都是移动设备上非常有益的特性。

XML 旨在供人类阅读,实际上对于计算机来说高效解析并不是特别容易,尽管它被设计为可靠且一致地解析。

关于java - android 的新手-将 xml 文档编译成二进制格式有什么好处,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21186092/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com