The on-disk format is documented in the spec:
https://github.com/RoaringBitmap/RoaringFormatSpecIt's very simple actually. I worked on adding run container support which involved adding support for the newer serialization format in roaring-rs and it proved quite elegant.