Here's an npk file from \assets\res\model.
After several attempts with comtype scan I got a perfect match. The algorithm determined by the scan was LZ77EA_970, with an unzip size of 0x628 bytes for 0x28E bytes of compressed data from offset 0x20.
But I couldn't see any related info from the header, neither the tail.
And I found some strings in libclient.so from \lib\armeabi-v7a that might be helpful.
NXFileSystem has already been initialized!
RealFileOpener %s not found!
FileLoaderCreator %s not found!
Failed to create FileLoader, opener %s, loader %s, root %s, depth %d
Succeeded to create FileLoader, opener %s, loader %s, root %s, depth %d
AllNpkFilesHash::Load %s OK
AllNpkFilesHash::Load %s error
Failed to uncompress npk file(ZLIB) %d in real file %s opener tag %s, error code %d
Failed to uncompress npk file(LZ4) %d in real file %s opener tag %s, error code %d
Failed to uncompress npk file(LZO %d) %d in real file %s opener tag %s, error code %d
Unsupported compress type %d
Failed to init lzo library
Package %s under opener %s is loaded.
Failed to reload PackageFileLoader with root %s opener %s
Package %s under opener %s %s cache.
It didn't mention LZ77EA_970 though. But I recompressed the data with LZ4 compression, and the output matched with the original data, which proved that this file is indeed
LZ4-compressed. So base on these strings maybe it's true that these npk files use more than one compression.
its very difficult to identified what kind of compression their using for encrypt the npk files..