cstore uses 2 layered approach to store data
1 - blocks
- a column block contains 10K rows of data per column. each column block is stored next to each other. Data compression is done at block level. each block also contains header.
2 - stripes
- a stripe contains blocks for 150K (configurable) rows
each stripe has header/footer metadata.
Another file (cstore.footer) is used for storing metadata information about where stripes start and their length.
You can take a look at cstore serialization code and copy related code parts to produce data files. cstore_writer.c contains everything you need. It would require some coding on your part.
Please let me know if you want to go down to that path.