try it with the 1.0 release:
https://github.com/nicoboss/nsz/releases/tag/1.0
I compressed that update fine.
Thank you it now works. I updated my files and I posted the new one on the first page
Your keys.txt file is outdated when you get this error. You should always upgrade your keys.txt file when upgrading to a new firmware as otherwise you can's decrypt all your dumped games. I admit the error message is quite confusing as it's caused by sectionFilesystems[key] at Fs/Nca.py on line 209. I will make the error message more understandable in the next release which will come later today or tomorrow.
I am currently using the 9.0.1 keys.
I noticed that after comparing the files that I use in the modified build commit 53f7026 and the NSZ version 1.0 is the absence of the block compression inside the _init_.py
if useBlockCompression:
bytesToCompress = nspf.size-0x4000
blocksToCompress = bytesToCompress//blockSize + (bytesToCompress%blockSize > 0)
header = b'NCZBLOCK' #Magic
header += b'\x02' #Version
header += b'\x01' #Type
header += b'\x00' #Unused
header += blockSizeExponent.to_bytes(1, 'little') #blockSizeExponent in bits: 2^x
header += blocksToCompress.to_bytes(4, 'little') #Amount of Blocks
header += bytesToCompress.to_bytes(8, 'little') #Decompressed Size
header += b'\x00' * (blocksToCompress*4)
f.write(header)
I also encountered problem here:
if useBlockCompression:
buffer = partitions[partNr].read(blockSize)
while (len(buffer) < blockSize and partNr < len(partitions)-1):
partNr += 1
buffer += partitions[partNr].read(blockSize - len(buffer))
if len(buffer) == 0:
break
compressor = cctx.stream_writer(f)
compressor.write(buffer)
compressor.flush(zstandard.FLUSH_FRAME)
compressor.flush(zstandard.COMPRESSOBJ_FLUSH_FINISH)
compressedblockSizeList.append(f.tell() - blockStartFilePos)
blockID += 1
blockStartFilePos = f.tell()
else:
buffer = partitions[partNr].read(CHUNK_SZ)
while (len(buffer) < CHUNK_SZ and partNr < len(partitions)-1):
partNr += 1
buffer += partitions[partNr].read(CHUNK_SZ - len(buffer))
if len(buffer) == 0:
break
compressor.write(buffer)
decompressedBytes += len(buffer)
bar.update(len(buffer))
Thank you
@blawar and
@nicoboss for your reply