Open main menu

Difference between revisions of "Cine/Specifications"

m
Fixed heading levels.
(Added a couple of links to Cine's unpacking code to help understanding of the way Delphine's unpacker handled the source stream chunks internally (And why the first chunk seems peculiar).)
m (Fixed heading levels.)
Line 135: Line 135:
</pre>
</pre>


===Bit sequences in the compressed stream===
====Bit sequences in the compressed stream====


The whole packed data consists of commands and their parameters.
The whole packed data consists of commands and their parameters.
Line 191: Line 191:
* We read one bit from the stream, it's 1. So the command has length of three bits. We read two more bits, they're 0 and 0 (i.e. 00b). So we've got command copyRelocatedBytes(9 bits, 3). Let's read 9 bits from the source stream and call that OFFSET. Then we'll call copyRelocatedBytes(OFFSET, 3).
* We read one bit from the stream, it's 1. So the command has length of three bits. We read two more bits, they're 0 and 0 (i.e. 00b). So we've got command copyRelocatedBytes(9 bits, 3). Let's read 9 bits from the source stream and call that OFFSET. Then we'll call copyRelocatedBytes(OFFSET, 3).


===End of decompression===
====End of decompression====


The unpacking ends when we've written <i>unpacked length</i> bytes into the destination buffer.
The unpacking ends when we've written <i>unpacked length</i> bytes into the destination buffer.
417

edits