7

我是 Android 的新程序员,所以请原谅我的知识和我的英语,因为它不是我的第一语言。所以我有一个带有标签的日志:“szipinf”和文本:“Initializing inflate state”,我不知道它是什么意思......我还看到它只在我在手机上测试游戏时出现,在模拟器上它不显示。如果有人能告诉我这意味着什么,我将不胜感激。

4

1 回答 1

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");
    ...
}

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

/*
 * 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.
 */

更确切地说:

static Asset* createFromCompressedFile(const char* fileName, AccessMode mode);

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

于 2012-06-12T11:12:40.167 回答