Dungeon Keeper Wiki
Advertisement
"RNC" redirects here. For the tool to compress a file in this format, see Dungeon Keeper Small Utilities.
Edit-clear
This article is in need of a clean-up. You can help out Dungeon Keeper Wiki by re-organizing parts of the article, checking grammar and spelling, and doing other helpful things to correct the article.
  • Reason: Article is too technical; it needs to be made understandable to laypeople.
Rob Northen compression (RNC)

A RNC-compressed file, viewed in Imhex

Rob Northen compression (RNC) is a data compression format. It was created in 1991 by Rob Northen. Many files used by Dungeon Keeper are compressed in this format.

Technical Description[]

Header[]

Rob Northen compression (RNC) Header

A RNC-compressed file is prefixed by an 18-octet header containing information about the file:

RNC Header
Data Octet index Size in Octets
Signature (the string 'RNC') 0-2 3
Compression method number 3 1
Original size 4-7 4
Compressed size 8-11 4
Original checksum 12-13 2
Compressed checksum 14-15 2
Leeway 16 1
Number of pack chunks 17 1

Compression[]

Method 1[]

This is the method used in RNC-compressed files in Dungeon Keeper. There is a bit stream, which is read from right to left as little endian 2-octet values, and a byte stream. Pack chunks contain three Huffman trees (one each for data sizes, distance values, and length values), each consisting of the number of leaf nodes (5 bits) and a bit depth (4 bits) for each node; the number of subchunks (16 bits); and the subchunk data, which contains byte stream literals and Huffman codes from the bit stream for the number of literals in the byte stream and the distances and lengths.

Method 2[]

Ambox important orange
'Your Library is too small!' - The Mentor (DK1)
This section needs expansion. You can help by adding to it.

Like the first method, there is a bit stream and a byte stream; however, here, the bit stream is read from left to right as single octets. There are no Huffman trees or subchunks, but a prefix coding.

Use in Dungeon Keeper[]

Dungeon Keeper 2 Pickaxe Tag
To do:
Perhaps a list of which files?

Many level files are compressed in RNC format. The game automatically decompresses them when they are loaded (though does not save the result to the disk), so the player need not worry about RNC when playing the game.

The dernc tool in the Dungeon Keeper Small Utilities suite and the DeRNC tool in the DKTools suite can be used to permanently decompress RNC-compressed files. The rnc tool in the former can be used to compress a file in RNC format; however, this does not work on all files.

Use elsewhere[]

Bullfrog Productions is only one video game developer known for using RNC. Traveller's Tales is another. Many Sega Mega Drive games use RNC.

External Links[]

Advertisement