- "RNC" redirects here. For the tool to compress a file in this format, see Dungeon Keeper Small Utilities.
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 in Dungeon Keeper and other Bullfrog Productions games are compressed in this format.
Technical Description[]
Header[]

A RNC-compressed file is prefixed by an 18-octet header containing information about the file:
| 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[]
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[]
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.
Unearth prompts the user to decompress RNC-compressed files; it is unable to load maps compressed maps.
UnDed is unable to load previews of RNC-compressed maps.
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[]
- Rob Northen compression at Sega Retro
| ||||||||||||||||