Discussion:
[Linuxsampler-devel] Kontakt NKI file format
Christian Schoenebeck
2010-07-28 08:33:58 UTC
Permalink
Hi!

Does anybody know something about the NKI file format? Apprently a NKI file
encapsulates a compressed XML file. The question is, how is it compressed?

Benno said it would be an ordinary ZIP file with some bytes prepended. I looked
now at some Kontakt 2 ... 4 files and cannot confirm that. I neither see
something that looks similar to a zip header (no matter which offset) and I
dont find a DEFLATE compression stream either (which is pretty much the
standard compression method for zip).

Any hints?

CU
Christian
Grigor Iliev
2010-07-28 11:25:33 UTC
Permalink
Here is how I successfully uncompressed nki file using zlib:
I look for the first occurrence of "78 9C" bytes and skip the bytes
before those magic bytes
dd if=a.nki of=a.z bs=10 skip=17

Then, I use http://www.zlib.net/zpipe.c
gcc zpipe.c -o zpipe -lz
./zpipe -d < a.z > a.xml


On Wed, Jul 28, 2010 at 11:33 AM, Christian Schoenebeck
Post by Christian Schoenebeck
Hi!
Does anybody know something about the NKI file format? Apprently a NKI file
encapsulates a compressed XML file. The question is, how is it compressed?
Benno said it would be an ordinary ZIP file with some bytes prepended. I looked
now at some Kontakt 2 ... 4 files and cannot confirm that. I neither see
something that looks similar to a zip header (no matter which offset) and I
dont find a DEFLATE compression stream either (which is pretty much the
standard compression method for zip).
Any hints?
CU
Christian
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Linuxsampler-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Christian Schoenebeck
2010-07-28 14:56:57 UTC
Permalink
Post by Grigor Iliev
I look for the first occurrence of "78 9C" bytes and skip the bytes
before those magic bytes
dd if=a.nki of=a.z bs=10 skip=17
Then, I use http://www.zlib.net/zpipe.c
gcc zpipe.c -o zpipe -lz
./zpipe -d < a.z > a.xml
Oops, you're right. I actually did the same, but using cut instead of dd. I
guess there was some newline character issue. Anyway, it works that way for
Kontakt v2, v3 and even v4 files.

Thanks Grigor!

CU
Christian

Loading...