@CNS

This format is used in Yggdra Union, and it is variation of LZ.

First goes header of 0x20 bytes.

0x000: 4 bytes, magic number, "@CNS"
0x004: 4 bytes, variable string
0x008: 4 bytes, original file size
0x00C: 4 bytes, unknown 0x00313031
0x010: 16 bytes, unknown, 0x00

Compressed data is largely divided into two types
1. In the uncompressed data to be registered in advance
2. The position and length information of the registered word in the dictionary that they.

Based on two sharing depends on whether the MSB of the first byte is clear Nya set.
If the clear number one and set back a second time.

1 If single, the uncompressed data corresponding to the value in the length of the byte is followed in the following.

2 If single, the value of as much as a +3 on a value other than the MSB by the length, and moves to the -1 value minus the value of the next byte by referring to the dictionary.

3 adds to the length of the reason, it is 2 times the length of the data that takes on a negative value that is one greater than the position because it is not pointing to the sense of the word because it is more than 2 bytes 2 bytes are meant to -0 = 0 is to further extend because.


All information is from this site: http://jabum.tistory.com/19