来自标签的日志是什么意思:"szipinf"和文本:从Logcat"初始化膨胀状态"

Chi*_*fan 7 logging android state initializing inflate

我是Android的新程序员,所以请原谅我的知识和英语,因为它不是我的第一语言.所以我有一个带有标签的日志:"szipinf"和文字:"初始化膨胀状态",我不知道它意味着什么......我也看到只有当我在手机上测试游戏时,在模拟器上它没有出现.如果有人能告诉我这是什么意思,我真的很感激.

And*_*kov 4

我们通过源码搜索一下这条消息,看看是谁打印了这条日志。StreamingZipInflater.cpp:

/*
 * Streaming access to compressed data held in an mmapped region of memory
 */
StreamingZipInflater::StreamingZipInflater(FileMap* dataMap, size_t uncompSize) {
    ...
    initInflateState();
}

void StreamingZipInflater::initInflateState() {
    LOGV("Initializing inflate state");
    ...
}
Run Code Online (Sandbox Code Playgroud)

我们想问的下一个问题是它在哪里以及如何使用?其中是用于处理压缩文件_CompressedAsset的子类:Asset

/*
 * Instances of this class provide read-only operations on a byte stream.
 *
 * Access may be optimized for streaming, random, or whole buffer modes.  All
 * operations are supported regardless of how the file was opened, but some
 * things will be less efficient.
 *
 * "Asset" is the base class for all types of assets.  The classes below
 * provide most of the implementation.  The AssetManager uses one of the
 * static "create" functions defined here to create a new instance.
 */
Run Code Online (Sandbox Code Playgroud)

更确切地说:

static Asset* createFromCompressedFile(const char* fileName, AccessMode mode);
Run Code Online (Sandbox Code Playgroud)

您可以在 renderscript 和其他地方找到此类的用法BitmapFactory