Fixed bugs in substreambuf
Implemented unpacking of n2pk files