Slax author's Blog (RSS)
08
October2012
Dynamic size Slax changes
Since persistent changes is an essential feature of Slax, I decided to rewrite the dynamic-size filesystem for Slax-changes in order to reduce the filesystem size and save the changes in a single file. Here is the file format I'm going to use:
File format:
+-------------------+=====================+
| header (32 bytes) | data (dynamic size) |
+-------------------+=====================+
Data format:
+================+-----------------------+-------------------+...
| indexes (256k) | next ix pos (8 bytes) | data (up to 64MB) |
+================+-----------------------+-------------------+...
^-------------------- dynamic repeat ------------------------^
Indexes format (fixed size):
+-----------------------------+-------------------------+...
| original seek pos (8 bytes) | real seek pos (8 bytes) |
+-----------------------------+-------------------------+...
^------------------- repeat 16384 times ----------------^
Each block of indexes (256k) is sorted. Right after the index block there is a seek position to next index block. Data contains plain data blocks, each is 4k bytes. No metadata here.

User comments

